42 lines
1.4 KiB
Python
42 lines
1.4 KiB
Python
# Generated by Django 5.2.14 on 2026-05-14 16:35
|
|
|
|
import django.db.models.deletion
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='UF',
|
|
fields=[
|
|
('codigo', models.PositiveSmallIntegerField(primary_key=True, serialize=False)),
|
|
('nome', models.CharField(max_length=100, unique=True)),
|
|
],
|
|
options={
|
|
'verbose_name': 'UF',
|
|
'verbose_name_plural': 'UFs',
|
|
'ordering': ['nome'],
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name='Municipio',
|
|
fields=[
|
|
('codigo', models.PositiveIntegerField(primary_key=True, serialize=False)),
|
|
('nome', models.CharField(max_length=150)),
|
|
('uf', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='municipios', to='core.uf')),
|
|
],
|
|
options={
|
|
'verbose_name': 'municipio',
|
|
'verbose_name_plural': 'municipios',
|
|
'ordering': ['nome'],
|
|
'indexes': [models.Index(fields=['nome'], name='core_munici_nome_0e9814_idx'), models.Index(fields=['uf', 'nome'], name='core_munici_uf_id_ac0c6d_idx')],
|
|
},
|
|
),
|
|
]
|