Ejemplo n.º 1
0
 class Meta:
     indexes = [
         models.Index(fields=['enterprise_customer_uuid', 'program_uuid'])
     ]
Ejemplo n.º 2
0
 class Meta:
     indexes = [models.Index(fields=["seance_date", "start", "end"])]
Ejemplo n.º 3
0
class Migration(migrations.Migration):

    dependencies = [
        ('course_overviews', '0017_auto_20191002_0823'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('sites', '0002_alter_domain_unique'),
        ('discounts', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='DiscountPercentageConfig',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('change_date',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='Change date')),
                ('enabled',
                 models.NullBooleanField(default=None,
                                         verbose_name='Enabled')),
                ('org',
                 models.CharField(
                     blank=True,
                     db_index=True,
                     help_text=
                     'Configure values for all course runs associated with this Organization. This is the organization string (i.e. edX, MITx).',
                     max_length=255,
                     null=True)),
                ('org_course',
                 models.CharField(
                     blank=True,
                     db_index=True,
                     help_text=
                     "Configure values for all course runs associated with this course. This is should be formatted as 'org+course' (i.e. MITx+6.002x, HarvardX+CS50).",
                     max_length=255,
                     null=True,
                     validators=[
                         openedx.core.djangoapps.config_model_utils.models.
                         validate_course_in_org
                     ],
                     verbose_name='Course in Org')),
                ('percentage', models.PositiveIntegerField()),
                ('changed_by',
                 models.ForeignKey(editable=False,
                                   null=True,
                                   on_delete=django.db.models.deletion.PROTECT,
                                   to=settings.AUTH_USER_MODEL,
                                   verbose_name='Changed by')),
                ('course',
                 models.ForeignKey(
                     blank=True,
                     help_text=
                     'Configure values for this course run. This should be formatted as the CourseKey (i.e. course-v1://MITx+6.002x+2019_Q1)',
                     null=True,
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='course_overviews.CourseOverview',
                     verbose_name='Course Run')),
                ('site',
                 models.ForeignKey(
                     blank=True,
                     help_text=
                     'Configure values for all course runs associated with this site.',
                     null=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     to='sites.Site')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AddIndex(
            model_name='discountpercentageconfig',
            index=models.Index(fields=['site', 'org', 'course'],
                               name='discounts_d_site_id_f87020_idx'),
        ),
        migrations.AddIndex(
            model_name='discountpercentageconfig',
            index=models.Index(fields=['site', 'org', 'org_course', 'course'],
                               name='discounts_d_site_id_9fe8d6_idx'),
        ),
    ]
Ejemplo n.º 4
0
 class Meta:
     unique_together = (("sequence_id", "position"),)
     db_table = "timestamp_sequenced_items"
     indexes = [models.Index(fields=["position"], name="position_idx")]
Ejemplo n.º 5
0
 class Meta:
     indexes = [models.Index(fields=[
         "first_created",
     ])]
     verbose_name = "红包个数设置"
     verbose_name_plural = "红包个数设置"
Ejemplo n.º 6
0
 class Meta():
     verbose_name_plural = "Computed GEO Score Data"
     indexes = [
         models.Index(fields=['latitude','longitude'])
     ]
Ejemplo n.º 7
0
 class Meta:
     indexes = [
         models.Index(fields=['name'], name="person_name_idx"),
     ]
Ejemplo n.º 8
0
 class Meta:
     unique_together = ('pulp2_id', 'pulp2_content_type_id', 'pulp2_repo',
                        'pulp2_subid')
     indexes = [
         models.Index(fields=['pulp2_content_type_id']),
     ]
 class Meta:
     ordering = ('-timestamp',)
     indexes = (models.Index(fields=["work_title"]),)
Ejemplo n.º 10
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='AfterSaleManage',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('create_time',
                 models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('update_time',
                 models.DateTimeField(auto_now=True, verbose_name='更新时间')),
                ('notifyID',
                 models.CharField(max_length=40, verbose_name='提醒编号')),
                ('SGcycleTime', models.IntegerField(verbose_name='砂罐周期')),
                ('SGprotectTime', models.DateField(verbose_name='砂罐保养开始时间')),
                ('TGcycleTime', models.IntegerField(verbose_name='碳罐周期')),
                ('TGprotectTime', models.DateField(verbose_name='碳罐保养开始时间')),
                ('RHcycleTime', models.IntegerField(verbose_name='软化周期')),
                ('RHprotectTime', models.DateField(verbose_name='软化保养开始时间')),
                ('JLcycleTime', models.IntegerField(verbose_name='精滤周期')),
                ('JLprotectTime', models.DateField(verbose_name='精滤保养开始时间')),
                ('ROcycleTime', models.IntegerField(verbose_name='RO膜周期')),
                ('ROprotectTime', models.DateField(verbose_name='RO膜保养开始时间')),
                ('deviceID', models.CharField(max_length=40,
                                              verbose_name='设备号')),
                ('SGName', models.CharField(max_length=40,
                                            verbose_name='砂罐名称')),
                ('SGUseTime',
                 models.DateTimeField(max_length=40, verbose_name='砂罐使用时间')),
                ('SGSetCycle', models.IntegerField(verbose_name='砂罐设置周期')),
                ('TGName', models.CharField(max_length=40,
                                            verbose_name='碳罐名称')),
                ('TGUseTime',
                 models.DateTimeField(max_length=40, verbose_name='碳罐使用时间')),
                ('TGSetCycle', models.IntegerField(verbose_name='碳罐设置周期')),
                ('RHName', models.CharField(max_length=40,
                                            verbose_name='软化名称')),
                ('RHUseTime',
                 models.DateTimeField(max_length=40, verbose_name='软化使用时间')),
                ('RHSetCycle', models.IntegerField(verbose_name='软化设置周期')),
                ('JLName', models.CharField(max_length=40,
                                            verbose_name='精滤名称')),
                ('JLUseTime',
                 models.DateTimeField(max_length=40, verbose_name='精滤使用时间')),
                ('JLSetCycle', models.IntegerField(verbose_name='精滤设置周期')),
                ('ROName', models.CharField(max_length=40,
                                            verbose_name='RO膜名称')),
                ('ROUseTime',
                 models.DateTimeField(max_length=40, verbose_name='RO膜使用时间')),
                ('ROSetCycle', models.IntegerField(verbose_name='RO膜设置周期')),
            ],
            options={
                'verbose_name': '售后提醒单',
                'verbose_name_plural': '售后提醒单',
            },
        ),
        migrations.CreateModel(
            name='Device',
            fields=[
                ('create_time',
                 models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('update_time',
                 models.DateTimeField(auto_now=True, verbose_name='更新时间')),
                ('nid', models.AutoField(primary_key=True, serialize=False)),
                ('device_id',
                 models.CharField(help_text='设备ID',
                                  max_length=50,
                                  unique=True,
                                  verbose_name='设备ID')),
                ('remarks',
                 models.CharField(blank=True,
                                  help_text='备注名称',
                                  max_length=50,
                                  null=True,
                                  verbose_name='备注名称')),
                ('online',
                 models.IntegerField(choices=[(0, '离线'), (1, '在线'), (2, '未知')],
                                     default=2,
                                     help_text='是否离线',
                                     verbose_name='是否离线')),
                ('arg_set_state',
                 models.IntegerField(choices=[(0, '失败'), (1, '成功'), (2, '未知')],
                                     default=2,
                                     help_text='参数设置是否成功',
                                     verbose_name='参数设置是否成功')),
                ('temperature',
                 models.FloatField(blank=True,
                                   help_text='温度',
                                   max_length=10,
                                   null=True,
                                   verbose_name='温度')),
                ('signal',
                 models.FloatField(blank=True,
                                   help_text='信号',
                                   max_length=10,
                                   null=True,
                                   verbose_name='信号')),
                ('chunShui',
                 models.IntegerField(default=0,
                                     help_text='纯水',
                                     verbose_name='纯水')),
                ('yuanShui',
                 models.IntegerField(default=0,
                                     help_text='原水',
                                     verbose_name='原水')),
                ('zhiShuiTime',
                 models.IntegerField(default=0,
                                     help_text='制水时间',
                                     verbose_name='制水时间')),
                ('zhiShuiTotalTime',
                 models.IntegerField(default=0,
                                     help_text='制水累计',
                                     verbose_name='制水累计')),
                ('MainboardID',
                 models.CharField(help_text='主板编号',
                                  max_length=50,
                                  verbose_name='主板编号')),
                ('wenKongSwitch',
                 models.BooleanField(default=False, verbose_name='温控开关')),
                ('dev_state',
                 models.IntegerField(blank=True,
                                     choices=[(0, '出厂'), (1, '正常制水'),
                                              (2, '冲洗'), (3, '水满'), (4, '缺水'),
                                              (5, '臭氧'), (6, '清洗前置罐'),
                                              (10, '参数设置失败'),
                                              (11, '正常制水_repeat'), (12, '冲洗'),
                                              (13, '水满'), (14, '缺水'),
                                              (15, '臭氧'), (16, '清洗前置罐'),
                                              (20, '无原水'), (21, '低压'),
                                              (30, '无原水'), (31, '低压')],
                                     null=True,
                                     verbose_name='设备状态')),
                ('yuanShuibeng',
                 models.BooleanField(default=False, verbose_name='原水泵')),
                ('jinShuiFa',
                 models.BooleanField(default=False, verbose_name='进水阀')),
                ('diyaSwitch',
                 models.BooleanField(default=False, verbose_name='低压开关')),
                ('gaoYaBeng',
                 models.BooleanField(default=False, verbose_name='高压泵')),
                ('chongxiFa',
                 models.BooleanField(default=False, verbose_name='冲洗阀')),
                ('chouYangQi',
                 models.BooleanField(default=False, verbose_name='臭氧器')),
                ('remoteSwitch',
                 models.BooleanField(default=False, verbose_name='远程开关')),
                ('_1t',
                 models.IntegerField(blank=True,
                                     null=True,
                                     verbose_name='开启冲洗阀时间1T(1-240秒)')),
                ('_2t',
                 models.IntegerField(blank=True,
                                     null=True,
                                     verbose_name='开启制水泵时间2T(1-240秒)')),
                ('_3t',
                 models.IntegerField(blank=True,
                                     null=True,
                                     verbose_name='循环冲洗时间3T(1-240秒)')),
                ('_4t',
                 models.IntegerField(blank=True,
                                     null=True,
                                     verbose_name='水满后冲洗时间4T(1-240秒)')),
                ('_5t',
                 models.IntegerField(blank=True,
                                     null=True,
                                     verbose_name='冲洗时间间隔5T(1-240分)')),
                ('_6t',
                 models.IntegerField(blank=True,
                                     null=True,
                                     verbose_name='水满制水泵停止时间6T(5-240秒)')),
                ('_7t',
                 models.IntegerField(blank=True,
                                     null=True,
                                     verbose_name='臭氧杀菌时间7T(5-240秒)')),
                ('_8t',
                 models.IntegerField(blank=True,
                                     null=True,
                                     verbose_name='臭氧杀菌间隔8T(10-240分)')),
                ('_1c',
                 models.IntegerField(blank=True,
                                     null=True,
                                     verbose_name='温控加热启动温度1C(1-30℃)')),
                ('_2c',
                 models.IntegerField(blank=True,
                                     null=True,
                                     verbose_name='温控加热停止温度2C(1-30℃)')),
                ('_2d',
                 models.CharField(blank=True,
                                  max_length=20,
                                  null=True,
                                  verbose_name='电导率显示方式2D(1TDS 2电导率)')),
                ('_3d',
                 models.IntegerField(blank=True,
                                     null=True,
                                     verbose_name='TDS修正数据3D(0-255)')),
                ('_4d',
                 models.CharField(blank=True,
                                  max_length=20,
                                  null=True,
                                  verbose_name='洗膜方式4D(1低压 2高压)')),
            ],
            options={
                'verbose_name': '设备',
                'verbose_name_plural': '设备',
            },
        ),
        migrations.CreateModel(
            name='RepairDevice',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('create_time',
                 models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('update_time',
                 models.DateTimeField(auto_now=True, verbose_name='更新时间')),
                ('repairID',
                 models.CharField(blank=True,
                                  max_length=20,
                                  null=True,
                                  unique=True,
                                  verbose_name='报修编号')),
                ('repairState',
                 models.CharField(blank=True,
                                  max_length=20,
                                  null=True,
                                  verbose_name='报修状态')),
                ('reportMan',
                 models.CharField(max_length=20, verbose_name='报修人员')),
                ('Phone', models.CharField(max_length=20,
                                           verbose_name='联系电话')),
                ('deviceNum',
                 models.CharField(max_length=40, verbose_name='设备号')),
                ('repairAddr',
                 models.CharField(max_length=20, verbose_name='维修地点')),
                ('descErorr',
                 models.CharField(max_length=20, verbose_name='故障简述')),
                ('runErrorTime',
                 models.DateTimeField(auto_now_add=True, verbose_name='故障日期')),
                ('repairMan',
                 models.CharField(blank=True,
                                  max_length=20,
                                  null=True,
                                  verbose_name='上门维修人员')),
                ('repairManPhone',
                 models.CharField(blank=True,
                                  max_length=20,
                                  null=True,
                                  verbose_name='维修人员电话')),
                ('ifOk',
                 models.IntegerField(blank=True,
                                     choices=[(1, '已解决'), (2, '未解决')],
                                     null=True,
                                     verbose_name='是否解决')),
                ('ifSatisfied',
                 models.IntegerField(blank=True,
                                     choices=[(1, '非常满意'), (2, '满意'),
                                              (3, '不满意'), (4, '非常不满意')],
                                     null=True,
                                     verbose_name='是否满意')),
                ('comment',
                 models.CharField(blank=True,
                                  max_length=400,
                                  null=True,
                                  verbose_name='评价')),
            ],
            options={
                'verbose_name': '报修单',
                'verbose_name_plural': '报修单',
            },
        ),
        migrations.AddIndex(
            model_name='device',
            index=models.Index(fields=['online', 'dev_state'],
                               name='device_devi_online_a3b08a_idx'),
        ),
    ]
Ejemplo n.º 11
0
 class Meta:
     db_table = 'organizations'
     indexes = [
         models.Index(fields=['name'], name='organization_name_idx'),
     ]
Ejemplo n.º 12
0
 class Meta:
     unique_together = ['file', 'commit']
     indexes = [
         models.Index(fields=['file', 'commit'], name='file_change2')
     ]
Ejemplo n.º 13
0
 class Meta:
     ordering = (
         'enterprise_customer',
         '-active',
     )
     indexes = [models.Index(fields=['enterprise_customer', 'email_type'])]
Ejemplo n.º 14
0
 class Meta:
     indexes = [
         models.Index(fields=['code', 'user_email']),
         models.Index(fields=['code', 'status']),
     ]
class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('applications', '0012_applicationtemplate_visible'),
    ]

    operations = [
        migrations.CreateModel(
            name='ApplicationTemplateUserPermission',
            fields=[(
                'id',
                models.AutoField(
                    auto_created=True,
                    primary_key=True,
                    serialize=False,
                    verbose_name='ID',
                ),
            )],
            options={'db_table': 'app_applicationtemplateuserpermission'},
        ),
        migrations.CreateModel(
            name='VisualisationTemplate',
            fields=[],
            options={
                'verbose_name': 'Visualisation',
                'proxy': True,
                'indexes': [],
                'constraints': [],
            },
            bases=('applications.applicationtemplate', ),
        ),
        migrations.AddField(
            model_name='applicationtemplate',
            name='application_type',
            field=models.CharField(
                choices=[
                    (
                        'VISUALISATION',
                        'Visualisation: One instance launched and accessed by all authorized users',
                    ),
                    ('TOOL',
                     'Tool: A separate instance launched for each user'),
                ],
                default='TOOL',
                max_length=64,
            ),
        ),
        migrations.AddField(
            model_name='applicationtemplate',
            name='host_exact',
            field=models.CharField(blank=True, max_length=128),
        ),
        migrations.AddField(
            model_name='applicationtemplate',
            name='user_access_type',
            field=models.CharField(
                choices=[
                    ('REQUIRES_AUTHENTICATION', 'Requires authentication'),
                    ('REQUIRES_AUTHORIZATION', 'Requires authorization'),
                ],
                default='REQUIRES_AUTHENTICATION',
                max_length=64,
            ),
        ),
        migrations.AlterField(
            model_name='applicationtemplate',
            name='host_pattern',
            field=models.CharField(max_length=128),
        ),
        migrations.AlterField(
            model_name='applicationtemplate',
            name='spawner',
            field=models.CharField(
                choices=[('PROCESS', 'Process'), ('FARGATE', 'Fargate')],
                default='FARGATE',
                max_length=10,
            ),
        ),
        migrations.AlterUniqueTogether(name='applicationtemplate',
                                       unique_together={('host_exact',
                                                         'host_pattern')}),
        migrations.AddIndex(
            model_name='applicationtemplate',
            index=models.Index(fields=['host_exact'],
                               name='app_applica_host_ex_7bfb56_idx'),
        ),
        migrations.AddField(
            model_name='applicationtemplateuserpermission',
            name='application_template',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='applications.ApplicationTemplate',
            ),
        ),
        migrations.AddField(
            model_name='applicationtemplateuserpermission',
            name='user',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterUniqueTogether(
            name='applicationtemplateuserpermission',
            unique_together={('user', 'application_template')},
        ),
    ]
 class Meta:
     indexes = (models.Index(fields=["r_list_name", "related_user"]),)
     unique_together = (("r_list_name", "related_user"),)
Ejemplo n.º 17
0
 class Meta():
     verbose_name_plural = "Live Positioning Data"
     indexes = [
         models.Index(fields=['device_id']),
         models.Index(fields=['latitude','longitude'])
     ]
Ejemplo n.º 18
0
class Migration(migrations.Migration):

    dependencies = [
        ('stashology_app', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Color',
            fields=[
                ('id',
                 models.UUIDField(default=uuid.uuid4,
                                  editable=False,
                                  primary_key=True,
                                  serialize=False)),
                ('name', models.CharField(max_length=255)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='Finish',
            fields=[
                ('id',
                 models.UUIDField(default=uuid.uuid4,
                                  editable=False,
                                  primary_key=True,
                                  serialize=False)),
                ('name', models.CharField(max_length=255)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id',
                 models.UUIDField(default=uuid.uuid4,
                                  editable=False,
                                  primary_key=True,
                                  serialize=False)),
                ('name', models.CharField(max_length=255)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.AddIndex(
            model_name='tag',
            index=models.Index(fields=['name'],
                               name='stashology__name_b52ef5_idx'),
        ),
        migrations.AddIndex(
            model_name='tag',
            index=models.Index(fields=['created_at'],
                               name='stashology__created_6a6823_idx'),
        ),
        migrations.AddIndex(
            model_name='finish',
            index=models.Index(fields=['name'],
                               name='stashology__name_c7b320_idx'),
        ),
        migrations.AddIndex(
            model_name='finish',
            index=models.Index(fields=['created_at'],
                               name='stashology__created_4a37c3_idx'),
        ),
        migrations.AddIndex(
            model_name='color',
            index=models.Index(fields=['name'],
                               name='stashology__name_936f27_idx'),
        ),
        migrations.AddIndex(
            model_name='color',
            index=models.Index(fields=['created_at'],
                               name='stashology__created_2b6f15_idx'),
        ),
    ]
Ejemplo n.º 19
0
 class Meta:
     indexes = [
         models.Index(fields=['name'], name="company_name_idx"),
     ]
Ejemplo n.º 20
0
 class Meta:
     verbose_name = verbose_name_plural = "标签"
     indexes = [
         models.Index(fields=['id'], name='tag_id_idx'),
     ]
Ejemplo n.º 21
0
 class Meta:
     indexes = [
         models.Index(fields=["name"]),
         models.Index(fields=["email"]),
         models.Index(fields=["suburb"]),
     ]
Ejemplo n.º 22
0
 class Meta:
     unique_together = ('blocked_user', 'blocker',)
     indexes = [models.Index(fields=['blocked_user', 'blocker']),]
Ejemplo n.º 23
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ("documenten", "0001_initial"),
        ("catalogi", "0001_initial"),
        ("zaken", "0001_initial"),
    ]

    operations = [
        migrations.AddField(
            model_name="objectinformatieobject",
            name="_zaak",
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to="zaken.Zaak",
            ),
        ),
        migrations.AddField(
            model_name="objectinformatieobject",
            name="informatieobject",
            field=models.ForeignKey(
                help_text="URL-referentie naar het INFORMATIEOBJECT.",
                on_delete=django.db.models.deletion.CASCADE,
                to="documenten.EnkelvoudigInformatieObjectCanonical",
            ),
        ),
        migrations.AddField(
            model_name="gebruiksrechten",
            name="informatieobject",
            field=models.ForeignKey(
                help_text="URL-referentie naar het INFORMATIEOBJECT.",
                on_delete=django.db.models.deletion.CASCADE,
                to="documenten.EnkelvoudigInformatieObjectCanonical",
            ),
        ),
        migrations.AddField(
            model_name="enkelvoudiginformatieobject",
            name="_informatieobjecttype",
            field=models.ForeignKey(
                blank=True,
                help_text="URL-referentie naar het INFORMATIEOBJECTTYPE (in de Catalogi API).",
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to="catalogi.InformatieObjectType",
            ),
        ),
        migrations.AddField(
            model_name="enkelvoudiginformatieobject",
            name="canonical",
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to="documenten.EnkelvoudigInformatieObjectCanonical",
            ),
        ),
        migrations.AddConstraint(
            model_name="objectinformatieobject",
            constraint=models.CheckConstraint(
                check=models.Q(
                    models.Q(
                        models.Q(
                            models.Q(("_zaak__isnull", False), ("_zaak_url", "")),
                            models.Q(
                                models.Q(_negated=True, _zaak_url=""),
                                ("_zaak__isnull", True),
                            ),
                            _connector="OR",
                        ),
                        ("_besluit__isnull", True),
                        ("_besluit_url", ""),
                        ("object_type", "zaak"),
                    ),
                    models.Q(
                        models.Q(
                            models.Q(("_besluit__isnull", False), ("_besluit_url", "")),
                            models.Q(
                                models.Q(_besluit_url="", _negated=True),
                                ("_besluit__isnull", True),
                            ),
                            _connector="OR",
                        ),
                        ("_zaak__isnull", True),
                        ("_zaak_url", ""),
                        ("object_type", "besluit"),
                    ),
                    _connector="OR",
                ),
                name="check_type",
            ),
        ),
        migrations.AddConstraint(
            model_name="objectinformatieobject",
            constraint=models.UniqueConstraint(
                fields=("informatieobject", "_zaak"), name="unique_io_zaak_local"
            ),
        ),
        migrations.AddConstraint(
            model_name="objectinformatieobject",
            constraint=models.UniqueConstraint(
                condition=models.Q(_negated=True, _zaak_url=""),
                fields=("informatieobject", "_zaak_url"),
                name="unique_io_zaak_external",
            ),
        ),
        migrations.AddConstraint(
            model_name="objectinformatieobject",
            constraint=models.UniqueConstraint(
                fields=("informatieobject", "_besluit"), name="unique_io_besluit_local"
            ),
        ),
        migrations.AddConstraint(
            model_name="objectinformatieobject",
            constraint=models.UniqueConstraint(
                condition=models.Q(_besluit_url="", _negated=True),
                fields=("informatieobject", "_besluit_url"),
                name="unique_io_besluit_external",
            ),
        ),
        migrations.AddIndex(
            model_name="enkelvoudiginformatieobject",
            index=models.Index(
                fields=["canonical", "-versie"], name="documenten__canonic_31cc4e_idx"
            ),
        ),
        migrations.AddConstraint(
            model_name="enkelvoudiginformatieobject",
            constraint=models.CheckConstraint(
                check=models.Q(
                    models.Q(
                        models.Q(_informatieobjecttype__isnull=True, _negated=True),
                        ("_informatieobjecttype_url", ""),
                    ),
                    models.Q(
                        ("_informatieobjecttype__isnull", True),
                        models.Q(_informatieobjecttype_url="", _negated=True),
                    ),
                    _connector="OR",
                ),
                name="_informatieobjecttype_or__informatieobjecttype_url_filled",
            ),
        ),
        migrations.AlterUniqueTogether(
            name="enkelvoudiginformatieobject", unique_together={("uuid", "versie")},
        ),
    ]
Ejemplo n.º 24
0
 class Meta:
     indexes = [
         models.Index(fields=['elements_hash']),
         models.Index(fields=['timestamp']),
     ]
Ejemplo n.º 25
0
 class Meta:
     verbose_name = "金币设置"
     verbose_name_plural = "金币设置"
     indexes = [
         models.Index(fields=['ad_source', 'ad_type']),
     ]
Ejemplo n.º 26
0
 class Meta:
     indexes = [
         models.Index(fields=['publication_datetime']),
         models.Index(fields=['category']),
     ]
Ejemplo n.º 27
0
 class Meta:
     indexes = [models.Index(fields=['slug'])]
     ordering = ['-published_on']
Ejemplo n.º 28
0
class Migration(migrations.Migration):

    dependencies = [("common", "0012_auto_20180929_1317")]

    operations = [
        # https://stackoverflow.com/questions/28429933/django-migrations-using-runpython-to-commit-changes/39541048#39541048
        # UNCOMMENT this section if you are running a large byro upgrade that fails on migration
        # ALSO uncomment the section at the end of the list of operations
        # As an alternative, consider upgrading in smaller steps.
        # migrations.RunSQL(
        #     "SET CONSTRAINTS ALL IMMEDIATE", reverse_sql=migrations.RunSQL.noop
        # ),
        migrations.AlterField(
            model_name="logentry",
            name="datetime",
            field=models.DateTimeField(db_index=True,
                                       default=django.utils.timezone.now),
        ),
        migrations.AddField(
            model_name="logentry",
            name="auth_data",
            field=django.contrib.postgres.fields.jsonb.JSONField(default={}),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name="logentry",
            name="auth_hash",
            field=models.CharField(null=True, max_length=70),
        ),
        migrations.RunPython(fill_hash, migrations.RunPython.noop),
        migrations.AlterField(
            model_name="logentry",
            name="auth_hash",
            field=models.CharField(max_length=140, unique=True, null=False),
        ),
        migrations.AddField(
            model_name="logentry",
            name="auth_prev",
            field=models.ForeignKey(
                default="undefined:0",
                on_delete=django.db.models.deletion.PROTECT,
                related_name="auth_next",
                to="common.LogEntry",
                to_field="auth_hash",
                null=False,
                blank=False,
            ),
            preserve_default=False,
        ),
        migrations.RunPython(fill_prev, migrations.RunPython.noop),
        migrations.AddIndex(
            model_name="logentry",
            index=models.Index(
                fields=["content_type", "object_id"],
                name="common_loge_content_43b532_idx",
            ),
        ),
        migrations.AddIndex(
            model_name="logentry",
            index=models.Index(fields=["action_type"],
                               name="common_loge_action__1810d9_idx"),
        ),
        # migrations.RunSQL(
        #     migrations.RunSQL.noop, reverse_sql="SET CONSTRAINTS ALL IMMEDIATE"
        # ),
    ]
Ejemplo n.º 29
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('categories', '0001_initial'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('comments', '0001_initial'),
    ]

    operations = [
        migrations.AddField(
            model_name='reply',
            name='user',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='post',
            name='category',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='categories.category'),
        ),
        migrations.AddField(
            model_name='post',
            name='dislikes',
            field=models.ManyToManyField(blank=True,
                                         related_name='post_dislike',
                                         to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='post',
            name='likes',
            field=models.ManyToManyField(blank=True,
                                         related_name='post_like',
                                         to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='post',
            name='user',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='post',
            name='views',
            field=models.ManyToManyField(blank=True,
                                         related_name='post_views',
                                         to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='comment',
            name='dislikes',
            field=models.ManyToManyField(blank=True,
                                         related_name='comment_dislike',
                                         to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='comment',
            name='likes',
            field=models.ManyToManyField(blank=True,
                                         related_name='comment_like',
                                         to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='comment',
            name='post',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='comments.post'),
        ),
        migrations.AddField(
            model_name='comment',
            name='user',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddIndex(
            model_name='post',
            index=models.Index(fields=['user', 'post_date'],
                               name='comments_po_user_id_e9236f_idx'),
        ),
    ]
Ejemplo n.º 30
0
 class Meta:
     verbose_name_plural = "Studies"
     indexes = [models.Index(fields=["uid"])]