# -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2018-07-20 23:11
from __future__ import unicode_literals

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Condominio',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('criado_em', models.DateTimeField(auto_now_add=True, verbose_name='Criado em')),
                ('atualizado_em', models.DateTimeField(auto_now=True, verbose_name='Atualizado em')),
                ('cnpj', models.CharField(max_length=11, unique=True, verbose_name='CNPJ')),
                ('nome', models.CharField(max_length=100, verbose_name='Nome')),
                ('endereco', models.CharField(max_length=200, verbose_name='Endereco')),
            ],
            options={
                'verbose_name': 'Condominio',
                'verbose_name_plural': 'Condominios',
                'ordering': ('nome',),
            },
        ),
        migrations.CreateModel(
            name='GrupoHabitacional',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('criado_em', models.DateTimeField(auto_now_add=True, verbose_name='Criado em')),
                ('atualizado_em', models.DateTimeField(auto_now=True, verbose_name='Atualizado em')),
                ('nome', models.CharField(max_length=64, verbose_name='Nome')),
                ('tipo', models.CharField(choices=[('quadra', 'Quadra'), ('bloco', 'Bloco'), ('torre', 'Torre')], max_length=64, verbose_name='Tipo')),
                ('tipo_unidade', models.CharField(choices=[('apartamento', 'Apartamento'), ('casa', 'Casa'), ('chale', 'Chale')], max_length=64, verbose_name='Tipo unidade')),
                ('logradouro', models.CharField(blank=True, max_length=256, null=True, verbose_name='Logradouro')),
                ('condominio', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='grupos_habitacionais', to='comum.Condominio')),
            ],
            options={
                'verbose_name': 'Grupo Habitacional',
                'verbose_name_plural': 'Grupos Habitacionais',
                'ordering': ('nome',),
            },
        ),
        migrations.CreateModel(
            name='Perfil',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('criado_em', models.DateTimeField(auto_now_add=True, verbose_name='Criado em')),
                ('atualizado_em', models.DateTimeField(auto_now=True, verbose_name='Atualizado em')),
                ('sexo', models.CharField(choices=[('M', 'Masculino'), ('F', 'Feminino')], max_length=16, verbose_name='Sexo')),
                ('telefone', models.CharField(max_length=16, verbose_name='Telefone')),
                ('data_nascimento', models.DateField(verbose_name='Data de nascimento')),
                ('portaria', models.BooleanField(default=False, verbose_name='Portaria')),
                ('condominio', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='perfis', to='comum.Condominio')),
            ],
            options={
                'verbose_name': 'Perfil',
                'verbose_name_plural': 'Perfis',
            },
        ),
        migrations.CreateModel(
            name='UnidadeHabitacional',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('criado_em', models.DateTimeField(auto_now_add=True, verbose_name='Criado em')),
                ('atualizado_em', models.DateTimeField(auto_now=True, verbose_name='Atualizado em')),
                ('nome', models.CharField(max_length=16)),
                ('grupo_habitacional', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='unidades_habitacionais', to='comum.GrupoHabitacional')),
                ('proprietario', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='unidades_habitacionais', to='comum.Perfil')),
            ],
            options={
                'verbose_name': 'Unidade habitacional',
                'verbose_name_plural': 'Unidades habitacionais',
                'ordering': ('nome',),
            },
        ),
        migrations.AddField(
            model_name='perfil',
            name='unidade_habitacional',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='moradores', to='comum.UnidadeHabitacional'),
        ),
        migrations.AddField(
            model_name='perfil',
            name='usuario',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='perfil', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='condominio',
            name='sindico',
            field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='condominio_administrado', to='comum.Perfil'),
        ),
        migrations.AlterUniqueTogether(
            name='unidadehabitacional',
            unique_together=set([('nome', 'grupo_habitacional')]),
        ),
        migrations.AlterUniqueTogether(
            name='grupohabitacional',
            unique_together=set([('nome', 'condominio')]),
        ),
        migrations.AlterUniqueTogether(
            name='condominio',
            unique_together=set([('cnpj', 'nome')]),
        ),
    ]

1672dd242a706bfacaf32bdbc5447bef722700ab
<mask token>

<mask token>


class Migration(migrations.Migration):
    <mask token>
    <mask token>
    <mask token>

<mask token>


class Migration(migrations.Migration):
    initial = True
    dependencies = [migrations.swappable_dependency(settings.AUTH_USER_MODEL)]
    operations = [migrations.CreateModel(name='Condominio', fields=[('id',
        models.AutoField(auto_created=True, primary_key=True, serialize=
        False, verbose_name='ID')), ('criado_em', models.DateTimeField(
        auto_now_add=True, verbose_name='Criado em')), ('atualizado_em',
        models.DateTimeField(auto_now=True, verbose_name='Atualizado em')),
        ('cnpj', models.CharField(max_length=11, unique=True, verbose_name=
        'CNPJ')), ('nome', models.CharField(max_length=100, verbose_name=
        'Nome')), ('endereco', models.CharField(max_length=200,
        verbose_name='Endereco'))], options={'verbose_name': 'Condominio',
        'verbose_name_plural': 'Condominios', 'ordering': ('nome',)}),
        migrations.CreateModel(name='GrupoHabitacional', fields=[('id',
        models.AutoField(auto_created=True, primary_key=True, serialize=
        False, verbose_name='ID')), ('criado_em', models.DateTimeField(
        auto_now_add=True, verbose_name='Criado em')), ('atualizado_em',
        models.DateTimeField(auto_now=True, verbose_name='Atualizado em')),
        ('nome', models.CharField(max_length=64, verbose_name='Nome')), (
        'tipo', models.CharField(choices=[('quadra', 'Quadra'), ('bloco',
        'Bloco'), ('torre', 'Torre')], max_length=64, verbose_name='Tipo')),
        ('tipo_unidade', models.CharField(choices=[('apartamento',
        'Apartamento'), ('casa', 'Casa'), ('chale', 'Chale')], max_length=
        64, verbose_name='Tipo unidade')), ('logradouro', models.CharField(
        blank=True, max_length=256, null=True, verbose_name='Logradouro')),
        ('condominio', models.ForeignKey(on_delete=django.db.models.
        deletion.CASCADE, related_name='grupos_habitacionais', to=
        'comum.Condominio'))], options={'verbose_name':
        'Grupo Habitacional', 'verbose_name_plural': 'Grupos Habitacionais',
        'ordering': ('nome',)}), migrations.CreateModel(name='Perfil',
        fields=[('id', models.AutoField(auto_created=True, primary_key=True,
        serialize=False, verbose_name='ID')), ('criado_em', models.
        DateTimeField(auto_now_add=True, verbose_name='Criado em')), (
        'atualizado_em', models.DateTimeField(auto_now=True, verbose_name=
        'Atualizado em')), ('sexo', models.CharField(choices=[('M',
        'Masculino'), ('F', 'Feminino')], max_length=16, verbose_name=
        'Sexo')), ('telefone', models.CharField(max_length=16, verbose_name
        ='Telefone')), ('data_nascimento', models.DateField(verbose_name=
        'Data de nascimento')), ('portaria', models.BooleanField(default=
        False, verbose_name='Portaria')), ('condominio', models.ForeignKey(
        null=True, on_delete=django.db.models.deletion.CASCADE,
        related_name='perfis', to='comum.Condominio'))], options={
        'verbose_name': 'Perfil', 'verbose_name_plural': 'Perfis'}),
        migrations.CreateModel(name='UnidadeHabitacional', fields=[('id',
        models.AutoField(auto_created=True, primary_key=True, serialize=
        False, verbose_name='ID')), ('criado_em', models.DateTimeField(
        auto_now_add=True, verbose_name='Criado em')), ('atualizado_em',
        models.DateTimeField(auto_now=True, verbose_name='Atualizado em')),
        ('nome', models.CharField(max_length=16)), ('grupo_habitacional',
        models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
        related_name='unidades_habitacionais', to='comum.GrupoHabitacional'
        )), ('proprietario', models.ForeignKey(blank=True, null=True,
        on_delete=django.db.models.deletion.SET_NULL, related_name=
        'unidades_habitacionais', to='comum.Perfil'))], options={
        'verbose_name': 'Unidade habitacional', 'verbose_name_plural':
        'Unidades habitacionais', 'ordering': ('nome',)}), migrations.
        AddField(model_name='perfil', name='unidade_habitacional', field=
        models.ForeignKey(blank=True, null=True, on_delete=django.db.models
        .deletion.CASCADE, related_name='moradores', to=
        'comum.UnidadeHabitacional')), migrations.AddField(model_name=
        'perfil', name='usuario', field=models.OneToOneField(on_delete=
        django.db.models.deletion.CASCADE, related_name='perfil', to=
        settings.AUTH_USER_MODEL)), migrations.AddField(model_name=
        'condominio', name='sindico', field=models.OneToOneField(blank=True,
        null=True, on_delete=django.db.models.deletion.SET_NULL,
        related_name='condominio_administrado', to='comum.Perfil')),
        migrations.AlterUniqueTogether(name='unidadehabitacional',
        unique_together=set([('nome', 'grupo_habitacional')])), migrations.
        AlterUniqueTogether(name='grupohabitacional', unique_together=set([
        ('nome', 'condominio')])), migrations.AlterUniqueTogether(name=
        'condominio', unique_together=set([('cnpj', 'nome')]))]

from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):
    initial = True
    dependencies = [migrations.swappable_dependency(settings.AUTH_USER_MODEL)]
    operations = [migrations.CreateModel(name='Condominio', fields=[('id',
        models.AutoField(auto_created=True, primary_key=True, serialize=
        False, verbose_name='ID')), ('criado_em', models.DateTimeField(
        auto_now_add=True, verbose_name='Criado em')), ('atualizado_em',
        models.DateTimeField(auto_now=True, verbose_name='Atualizado em')),
        ('cnpj', models.CharField(max_length=11, unique=True, verbose_name=
        'CNPJ')), ('nome', models.CharField(max_length=100, verbose_name=
        'Nome')), ('endereco', models.CharField(max_length=200,
        verbose_name='Endereco'))], options={'verbose_name': 'Condominio',
        'verbose_name_plural': 'Condominios', 'ordering': ('nome',)}),
        migrations.CreateModel(name='GrupoHabitacional', fields=[('id',
        models.AutoField(auto_created=True, primary_key=True, serialize=
        False, verbose_name='ID')), ('criado_em', models.DateTimeField(
        auto_now_add=True, verbose_name='Criado em')), ('atualizado_em',
        models.DateTimeField(auto_now=True, verbose_name='Atualizado em')),
        ('nome', models.CharField(max_length=64, verbose_name='Nome')), (
        'tipo', models.CharField(choices=[('quadra', 'Quadra'), ('bloco',
        'Bloco'), ('torre', 'Torre')], max_length=64, verbose_name='Tipo')),
        ('tipo_unidade', models.CharField(choices=[('apartamento',
        'Apartamento'), ('casa', 'Casa'), ('chale', 'Chale')], max_length=
        64, verbose_name='Tipo unidade')), ('logradouro', models.CharField(
        blank=True, max_length=256, null=True, verbose_name='Logradouro')),
        ('condominio', models.ForeignKey(on_delete=django.db.models.
        deletion.CASCADE, related_name='grupos_habitacionais', to=
        'comum.Condominio'))], options={'verbose_name':
        'Grupo Habitacional', 'verbose_name_plural': 'Grupos Habitacionais',
        'ordering': ('nome',)}), migrations.CreateModel(name='Perfil',
        fields=[('id', models.AutoField(auto_created=True, primary_key=True,
        serialize=False, verbose_name='ID')), ('criado_em', models.
        DateTimeField(auto_now_add=True, verbose_name='Criado em')), (
        'atualizado_em', models.DateTimeField(auto_now=True, verbose_name=
        'Atualizado em')), ('sexo', models.CharField(choices=[('M',
        'Masculino'), ('F', 'Feminino')], max_length=16, verbose_name=
        'Sexo')), ('telefone', models.CharField(max_length=16, verbose_name
        ='Telefone')), ('data_nascimento', models.DateField(verbose_name=
        'Data de nascimento')), ('portaria', models.BooleanField(default=
        False, verbose_name='Portaria')), ('condominio', models.ForeignKey(
        null=True, on_delete=django.db.models.deletion.CASCADE,
        related_name='perfis', to='comum.Condominio'))], options={
        'verbose_name': 'Perfil', 'verbose_name_plural': 'Perfis'}),
        migrations.CreateModel(name='UnidadeHabitacional', fields=[('id',
        models.AutoField(auto_created=True, primary_key=True, serialize=
        False, verbose_name='ID')), ('criado_em', models.DateTimeField(
        auto_now_add=True, verbose_name='Criado em')), ('atualizado_em',
        models.DateTimeField(auto_now=True, verbose_name='Atualizado em')),
        ('nome', models.CharField(max_length=16)), ('grupo_habitacional',
        models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
        related_name='unidades_habitacionais', to='comum.GrupoHabitacional'
        )), ('proprietario', models.ForeignKey(blank=True, null=True,
        on_delete=django.db.models.deletion.SET_NULL, related_name=
        'unidades_habitacionais', to='comum.Perfil'))], options={
        'verbose_name': 'Unidade habitacional', 'verbose_name_plural':
        'Unidades habitacionais', 'ordering': ('nome',)}), migrations.
        AddField(model_name='perfil', name='unidade_habitacional', field=
        models.ForeignKey(blank=True, null=True, on_delete=django.db.models
        .deletion.CASCADE, related_name='moradores', to=
        'comum.UnidadeHabitacional')), migrations.AddField(model_name=
        'perfil', name='usuario', field=models.OneToOneField(on_delete=
        django.db.models.deletion.CASCADE, related_name='perfil', to=
        settings.AUTH_USER_MODEL)), migrations.AddField(model_name=
        'condominio', name='sindico', field=models.OneToOneField(blank=True,
        null=True, on_delete=django.db.models.deletion.SET_NULL,
        related_name='condominio_administrado', to='comum.Perfil')),
        migrations.AlterUniqueTogether(name='unidadehabitacional',
        unique_together=set([('nome', 'grupo_habitacional')])), migrations.
        AlterUniqueTogether(name='grupohabitacional', unique_together=set([
        ('nome', 'condominio')])), migrations.AlterUniqueTogether(name=
        'condominio', unique_together=set([('cnpj', 'nome')]))]

# -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2018-07-20 23:11
from __future__ import unicode_literals

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Condominio',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('criado_em', models.DateTimeField(auto_now_add=True, verbose_name='Criado em')),
                ('atualizado_em', models.DateTimeField(auto_now=True, verbose_name='Atualizado em')),
                ('cnpj', models.CharField(max_length=11, unique=True, verbose_name='CNPJ')),
                ('nome', models.CharField(max_length=100, verbose_name='Nome')),
                ('endereco', models.CharField(max_length=200, verbose_name='Endereco')),
            ],
            options={
                'verbose_name': 'Condominio',
                'verbose_name_plural': 'Condominios',
                'ordering': ('nome',),
            },
        ),
        migrations.CreateModel(
            name='GrupoHabitacional',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('criado_em', models.DateTimeField(auto_now_add=True, verbose_name='Criado em')),
                ('atualizado_em', models.DateTimeField(auto_now=True, verbose_name='Atualizado em')),
                ('nome', models.CharField(max_length=64, verbose_name='Nome')),
                ('tipo', models.CharField(choices=[('quadra', 'Quadra'), ('bloco', 'Bloco'), ('torre', 'Torre')], max_length=64, verbose_name='Tipo')),
                ('tipo_unidade', models.CharField(choices=[('apartamento', 'Apartamento'), ('casa', 'Casa'), ('chale', 'Chale')], max_length=64, verbose_name='Tipo unidade')),
                ('logradouro', models.CharField(blank=True, max_length=256, null=True, verbose_name='Logradouro')),
                ('condominio', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='grupos_habitacionais', to='comum.Condominio')),
            ],
            options={
                'verbose_name': 'Grupo Habitacional',
                'verbose_name_plural': 'Grupos Habitacionais',
                'ordering': ('nome',),
            },
        ),
        migrations.CreateModel(
            name='Perfil',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('criado_em', models.DateTimeField(auto_now_add=True, verbose_name='Criado em')),
                ('atualizado_em', models.DateTimeField(auto_now=True, verbose_name='Atualizado em')),
                ('sexo', models.CharField(choices=[('M', 'Masculino'), ('F', 'Feminino')], max_length=16, verbose_name='Sexo')),
                ('telefone', models.CharField(max_length=16, verbose_name='Telefone')),
                ('data_nascimento', models.DateField(verbose_name='Data de nascimento')),
                ('portaria', models.BooleanField(default=False, verbose_name='Portaria')),
                ('condominio', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='perfis', to='comum.Condominio')),
            ],
            options={
                'verbose_name': 'Perfil',
                'verbose_name_plural': 'Perfis',
            },
        ),
        migrations.CreateModel(
            name='UnidadeHabitacional',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('criado_em', models.DateTimeField(auto_now_add=True, verbose_name='Criado em')),
                ('atualizado_em', models.DateTimeField(auto_now=True, verbose_name='Atualizado em')),
                ('nome', models.CharField(max_length=16)),
                ('grupo_habitacional', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='unidades_habitacionais', to='comum.GrupoHabitacional')),
                ('proprietario', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='unidades_habitacionais', to='comum.Perfil')),
            ],
            options={
                'verbose_name': 'Unidade habitacional',
                'verbose_name_plural': 'Unidades habitacionais',
                'ordering': ('nome',),
            },
        ),
        migrations.AddField(
            model_name='perfil',
            name='unidade_habitacional',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='moradores', to='comum.UnidadeHabitacional'),
        ),
        migrations.AddField(
            model_name='perfil',
            name='usuario',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='perfil', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='condominio',
            name='sindico',
            field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='condominio_administrado', to='comum.Perfil'),
        ),
        migrations.AlterUniqueTogether(
            name='unidadehabitacional',
            unique_together=set([('nome', 'grupo_habitacional')]),
        ),
        migrations.AlterUniqueTogether(
            name='grupohabitacional',
            unique_together=set([('nome', 'condominio')]),
        ),
        migrations.AlterUniqueTogether(
            name='condominio',
            unique_together=set([('cnpj', 'nome')]),
        ),
    ]
