From 8cba646eb90c734ff35db141140496f345a1b93d Mon Sep 17 00:00:00 2001 From: Cadu Leite Date: Fri, 22 Jul 2016 17:21:56 -0300 Subject: [PATCH] close #19 - add migration 0001 - mks app compatible >=django1.7 --- municipios/migrations/0001_initial.py | 36 +++++++++++++++++++++++++++ municipios/migrations/__init__.py | 0 2 files changed, 36 insertions(+) create mode 100644 municipios/migrations/0001_initial.py create mode 100644 municipios/migrations/__init__.py diff --git a/municipios/migrations/0001_initial.py b/municipios/migrations/0001_initial.py new file mode 100644 index 0000000..abb9a5b --- /dev/null +++ b/municipios/migrations/0001_initial.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='Municipio', + fields=[ + ('id_ibge', models.IntegerField(serialize=False, primary_key=True)), + ('nome', models.CharField(max_length=150)), + ('nome_abreviado', models.CharField(max_length=150, null=True, blank=True)), + ('uf_sigla', models.CharField(max_length=2)), + ], + ), + migrations.CreateModel( + name='UF', + fields=[ + ('id_ibge', models.IntegerField(serialize=False, primary_key=True)), + ('uf', models.CharField(max_length=2)), + ('nome', models.CharField(max_length=20)), + ('regiao', models.CharField(max_length=20)), + ], + ), + migrations.AddField( + model_name='municipio', + name='uf', + field=models.ForeignKey(to='municipios.UF'), + ), + ] diff --git a/municipios/migrations/__init__.py b/municipios/migrations/__init__.py new file mode 100644 index 0000000..e69de29