コード例 #1
0
class Migration(migrations.Migration):

    dependencies = [
        ('company', '0029_auto_20180202_1514'),
    ]

    operations = [
        migrations.AlterField(
            model_name='company',
            name='description',
            field=models.TextField(verbose_name='Description'),
        ),
        migrations.AlterField(
            model_name='company',
            name='name',
            field=models.CharField(max_length=255, verbose_name='Name'),
        ),
        migrations.AlterField(
            model_name='company',
            name='taxonomies',
            field=models.ManyToManyField(related_name='companies', to='taxonomy.Taxonomy', verbose_name='Taxonomies'),
        ),
        migrations.AlterField(
            model_name='companycontact',
            name='company',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='company.Company', verbose_name='Company'),
        ),
        migrations.AlterField(
            model_name='companycontact',
            name='description',
            field=models.CharField(max_length=255, verbose_name='Description'),
        ),
        migrations.AlterField(
            model_name='companycontact',
            name='type',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='company.CompanyContactType', verbose_name='Type'),
        ),
        migrations.AlterField(
            model_name='companycontacttype',
            name='description',
            field=models.CharField(max_length=255, verbose_name='Description'),
        ),
        migrations.AlterField(
            model_name='membership',
            name='company',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='company.Company', verbose_name='Company'),
        ),
        migrations.AlterField(
            model_name='membership',
            name='permission',
            field=models.PositiveSmallIntegerField(choices=[(1, 'Admin'), (2, 'Collaborator')], validators=[apps.company.models.limit_to_membershiptypes], verbose_name='Permission'),
        ),
        migrations.AlterField(
            model_name='membership',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='Usu\xe1rio'),
        ),
    ]
コード例 #2
0
class Migration(migrations.Migration):

    dependencies = [
        ('company', '0022_auto_20161228_1347'),
    ]

    operations = [
        migrations.AlterField(
            model_name='company',
            name='taxonomies',
            field=models.ManyToManyField(related_name='companies',
                                         to='taxonomy.Taxonomy',
                                         verbose_name='Taxonomias'),
        ),
        migrations.AlterField(
            model_name='membership',
            name='permission',
            field=models.PositiveSmallIntegerField(
                choices=[(1, '^admin-portal/'), (2, 'Colaborador')],
                validators=[apps.company.models.limit_to_membershiptypes],
                verbose_name='Permiss\xe3o'),
        ),
        migrations.AlterField(
            model_name='membership',
            name='user',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL,
                verbose_name='Nome de usu\xe1rio'),
        ),
    ]
コード例 #3
0
class Migration(migrations.Migration):

    dependencies = [
        ('geography', '0003_auto_20160606_1632'),
        ('company', '0020_auto_20161212_1136'),
    ]

    operations = [
        migrations.AddField(
            model_name='company',
            name='city',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='geography.City',
                verbose_name='Cidade'),
        ),
        migrations.AlterField(
            model_name='company',
            name='taxonomies',
            field=models.ManyToManyField(related_name='companies',
                                         to='taxonomy.Taxonomy',
                                         verbose_name='Taxonomies'),
        ),
        migrations.AlterField(
            model_name='membership',
            name='permission',
            field=models.PositiveSmallIntegerField(
                choices=[(1, 'Admin'), (2, 'Collaborator')],
                validators=[apps.company.models.limit_to_membershiptypes],
                verbose_name='Permission'),
        ),
        migrations.AlterField(
            model_name='membership',
            name='user',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL,
                verbose_name='Usu\xe1rio'),
        ),
    ]
コード例 #4
0
class Migration(migrations.Migration):

    dependencies = [
        ('company', '0011_auto_20190208_1013'),
    ]

    operations = [
        migrations.CreateModel(
            name='UserCompanyCsv',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('csv_file',
                 models.FileField(
                     upload_to=apps.company.models.company_invite_csv_dir)),
                ('status',
                 models.PositiveIntegerField(choices=[(1, b'PENDING'),
                                                      (2, b'INPROGRESS'),
                                                      (3, b'PROCESSED'),
                                                      (4, b'ERROR')],
                                             default=1)),
                ('user_company',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='csvs',
                                   to='company.UserCompany')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
コード例 #5
0
class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('taxonomy', '0002_taxonomy_update_in'),
        ('company', '0015_merge_20160922_1422'),
    ]

    operations = [
        migrations.CreateModel(
            name='Membership',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('permission',
                 models.PositiveSmallIntegerField(
                     validators=[apps.company.models.limit_to_membershiptypes],
                     verbose_name='Permission')),
            ],
        ),
        migrations.AddField(
            model_name='company',
            name='taxonomies',
            field=models.ManyToManyField(related_name='companies',
                                         to='taxonomy.Taxonomy',
                                         verbose_name='Taxonomies'),
        ),
        migrations.AddField(
            model_name='company',
            name='user',
            field=models.OneToOneField(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name='company',
                to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='membership',
            name='company',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='company.Company',
                verbose_name='Empresa'),
        ),
        migrations.AddField(
            model_name='membership',
            name='user',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL,
                verbose_name='Usu\xe1rio'),
        ),
        migrations.AddField(
            model_name='company',
            name='members',
            field=models.ManyToManyField(related_name='companies',
                                         through='company.Membership',
                                         to=settings.AUTH_USER_MODEL),
        ),
    ]