Exemplo n.º 1
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        BtreeGinExtension(),
        migrations.CreateModel(
            name='Annotation',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('sessionId', models.CharField(max_length=48)),
                ('data',
                 django.contrib.postgres.fields.jsonb.JSONField(default=dict)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('user',
                 models.ForeignKey(
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'annotations',
            },
        ),
        migrations.AddIndex(
            model_name='annotation',
            index=django.contrib.postgres.indexes.GinIndex(
                fields=['user', 'data', 'updated', 'sessionId'],
                name='annotation_gin'),
        ),
    ]
Exemplo n.º 2
0
class Migration(migrations.Migration):

    dependencies = [
        ('cases', '0009_auto_20171007_0150'),
    ]

    operations = [
        BtreeGinExtension(),
        migrations.AlterField(
            model_name='case',
            name='title',
            field=fields.MaxCharField(
                help_text=
                'Не более 255 символов<br/>Не более 255 символов<br/>Не более 255 символов',
                max_length=255,
                verbose_name='Title'),
        ),
        migrations.AlterField(
            model_name='stage',
            name='title',
            field=fields.MaxCharField(
                help_text=
                'Не более 255 символов<br/>Не более 255 символов<br/>Не более 255 символов',
                max_length=255,
                verbose_name='Title'),
        ),
        migrations.AddIndex(
            model_name='case',
            index=django.contrib.postgres.indexes.GinIndex(
                fields=['title'], name='cases_case_title_81b6f9_gin'),
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('posthog', '0033_auto_20200316_1655'),
    ]

    operations = [TrigramExtension(), BtreeGinExtension()]
Exemplo n.º 4
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        BtreeGinExtension(),
        migrations.CreateModel(
            name='Task',
            fields=[
                ('id',
                 models.CharField(help_text='Task ID',
                                  max_length=512,
                                  primary_key=True,
                                  serialize=False)),
                ('first_saved',
                 models.DateTimeField(auto_now_add=True, db_index=True)),
                ('data',
                 django.contrib.postgres.fields.jsonb.JSONField(
                     blank=True, help_text='Task data')),
            ],
        ),
        migrations.AddIndex(
            model_name='task',
            index=django.contrib.postgres.indexes.GinIndex(
                fields=['data'], name='celery_pant_data_785c1b_gin'),
        ),
    ]
Exemplo n.º 5
0
class Migration(migrations.Migration):

    dependencies = [
        ('minitwitter', '0009_auto_20201001_1039'),
    ]

    operations = [TrigramExtension(), BtreeGinExtension()]
class Migration(migrations.Migration):

    dependencies = [
        ('product', '0037_auto_20171124_0847'),
    ]

    operations = [BtreeGinExtension()]
Exemplo n.º 7
0
class Migration(migrations.Migration):

    operations = [
        TrigramExtension(),
        BtreeGinExtension(),
        UnaccentExtension(),
        TextSearchExtension(),
    ]
Exemplo n.º 8
0
class Migration(migrations.Migration):
    dependencies = [
        ('core', '0004_auto_20210111_1716'),
    ]

    operations = [
        BtreeGinExtension(),
        UnaccentExtension(),
    ]
Exemplo n.º 9
0
class Migration(migrations.Migration):

    dependencies = [
        ('cases', '0016_auto_20191209_1701'),
    ]

    operations = [
        BtreeGinExtension(),
    ]
Exemplo n.º 10
0
class Migration(migrations.Migration):

    dependencies = [
        ('movies', '0014_auto_20200706_1935'),
    ]

    operations = [
        TrigramExtension(),
        BtreeGinExtension(),
    ]
Exemplo n.º 11
0
class Migration(migrations.Migration):

    dependencies = [
        ('lexicon', '0020_auto_20210401_1218'),
    ]

    operations = [
        BtreeGinExtension(),
        TrigramExtension(),
    ]
Exemplo n.º 12
0
class Migration(migrations.Migration):

    operations = [
        BtreeGinExtension(),
        # Ensure CreateExtension quotes extension names by creating one with a
        # dash in its name.
        CreateExtension('uuid-ossp'),
        HStoreExtension(),
        TrigramExtension(),
        UnaccentExtension(),
    ]
Exemplo n.º 13
0
class Migration(migrations.Migration):

    dependencies = [
        ('showgrum', '0002_auto_20190717_1536'),
    ]

    operations = [
        BtreeGinExtension(),
        migrations.AddIndex(
            model_name='articles',
            index=django.contrib.postgres.indexes.GinIndex(fields=['title'], name='showgrum_ar_title_d5ead5_gin'),
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [("misago_threads", "0004_update_settings")]

    operations = [
        BtreeGinExtension(),
        migrations.AddIndex(
            model_name="post",
            index=django.contrib.postgres.indexes.GinIndex(
                fields=["search_vector"],
                name="misago_thre_search__b472a2_gin"),
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('firstapp', '0012_auto_20200518_2306'),
    ]

    operations = [
        BtreeGinExtension(),
        migrations.AddIndex(
            model_name='book',
            index=django.contrib.postgres.indexes.GinIndex(
                fields=['name'], name='firstapp_bo_name_27ec38_gin'),
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('misago_threads', '0004_update_settings'),
    ]

    operations = [
        BtreeGinExtension(),
        migrations.AddIndex(
            model_name='post',
            index=django.contrib.postgres.indexes.GinIndex(
                fields=['search_vector'],
                name='misago_thre_search__b472a2_gin'),
        ),
    ]
Exemplo n.º 17
0
class Migration(migrations.Migration):

    dependencies = [
        ('app', '0002_event_prevalent_when'),
    ]

    operations = [
        BtreeGinExtension(),
        migrations.AddIndex(
            model_name='event',
            index=django.contrib.postgres.indexes.GinIndex(
                fields=['title', 'description'],
                name='app_event_title_4db519_gin'),
        ),
    ]
Exemplo n.º 18
0
class Migration(migrations.Migration):

    operations = [
        BloomExtension(),
        BtreeGinExtension(),
        BtreeGistExtension(),
        CITextExtension(),
        # Ensure CreateExtension quotes extension names by creating one with a
        # dash in its name.
        CreateExtension("uuid-ossp"),
        # CryptoExtension is required for RandomUUID() on PostgreSQL < 13.
        CryptoExtension() if needs_crypto_extension else mock.Mock(),
        HStoreExtension(),
        TrigramExtension(),
        UnaccentExtension(),
    ]
Exemplo n.º 19
0
class Migration(migrations.Migration):

    operations = [
        (BloomExtension() if getattr(connection.features, 'has_bloom_index',
                                     False) else mock.Mock()),
        BtreeGinExtension(),
        BtreeGistExtension(),
        CITextExtension(),
        # Ensure CreateExtension quotes extension names by creating one with a
        # dash in its name.
        CreateExtension('uuid-ossp'),
        CryptoExtension(),
        HStoreExtension(),
        TrigramExtension(),
        UnaccentExtension(),
    ]
Exemplo n.º 20
0
class Migration(migrations.Migration):

    dependencies = [
        ('firstapp', '0013_auto_20200519_1508'),
    ]

    operations = [
        BtreeGinExtension(),
        migrations.RemoveIndex(
            model_name='book',
            name='firstapp_bo_name_27ec38_gin',
        ),
        migrations.AddIndex(
            model_name='book',
            index=django.contrib.postgres.indexes.GinIndex(fields=['age'], name='firstapp_bo_age_0f413f_gin'),
        ),
    ]
Exemplo n.º 21
0
class Migration(migrations.Migration):

    dependencies = [
        ("crawler", "0003_rssentry"),
    ]

    operations = [
        migrations.AddField(
            model_name="rssentry",
            name="headers",
            field=models.JSONField(db_index=True, default=dict),
        ),
        migrations.AddField(
            model_name="rssentry",
            name="raw_html",
            field=models.TextField(null=True, default=None),
        ),
        migrations.AddField(
            model_name="rssentry",
            name="requested_at",
            field=models.DateTimeField(null=True),
        ),
        migrations.AddField(
            model_name="rssentry",
            name="resolved_url",
            field=models.URLField(max_length=2048, null=True),
        ),
        migrations.AddField(
            model_name="rssentry",
            name="status_code",
            field=models.IntegerField(null=True),
        ),
        BtreeGinExtension(),
        migrations.AddIndex(
            model_name="rssentry",
            index=django.contrib.postgres.indexes.GinIndex(
                fields=["headers"], name="crawler_rss_headers_fa2911_gin"
            ),
        ),
        migrations.AlterField(
            model_name='rssfeed',
            name='url',
            field=models.URLField(max_length=2048),
        ),

    ]
Exemplo n.º 22
0
class Migration(migrations.Migration):

    dependencies = [
        ('api', '0022_auto_20200823_1553'),
    ]

    operations = [
        TrigramExtension(),
        BtreeGinExtension(),
        migrations.AlterModelOptions(
            name='answer',
            options={'ordering': ['-pub_date']},
        ),
        migrations.AlterModelOptions(
            name='article',
            options={'ordering': ['-pub_date']},
        ),
        migrations.AlterModelOptions(
            name='comment',
            options={'ordering': ['-pub_date']},
        ),
        migrations.AlterModelOptions(
            name='question',
            options={'ordering': ['-pub_date']},
        ),
        migrations.AlterModelOptions(
            name='review',
            options={'ordering': ['-pub_date']},
        ),
        migrations.AddIndex(
            model_name='article',
            index=django.contrib.postgres.indexes.GinIndex(
                fields=['title'], name='api_article_title_81ceae_gin'),
        ),
        migrations.AddIndex(
            model_name='question',
            index=django.contrib.postgres.indexes.GinIndex(
                fields=['name'], name='api_questio_name_638061_gin'),
        ),
        migrations.AddIndex(
            model_name='user',
            index=django.contrib.postgres.indexes.GinIndex(
                fields=['email'], name='api_user_email_adeff9_gin'),
        ),
    ]
Exemplo n.º 23
0
class Migration(migrations.Migration):

    dependencies = [
        ('miller', '0003_ngrams'),
    ]

    operations = [
        BtreeGinExtension(),
        migrations.AlterModelOptions(
            name='ngrams',
            options={'verbose_name_plural': 'a lot of ngrams'},
        ),
        migrations.AddIndex(
            model_name='ngrams',
            index=django.contrib.postgres.indexes.GinIndex(
                fields=[b'segment'], name='miller_ngra_segment_511b9b_gin'),
        ),
    ]
Exemplo n.º 24
0
class Migration(migrations.Migration):

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

    operations = [
        TrigramExtension(),
        BtreeGinExtension(),
        migrations.AddIndex(
            model_name='wine',
            index=django.contrib.postgres.indexes.GinIndex(
                fields=['description', 'variety', 'winery'],
                name='desc_var_win_gin_idx',
                opclasses=['gin_trgm_ops', 'gin_trgm_ops', 'gin_trgm_ops'],
            ),
        ),
    ]
Exemplo n.º 25
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        BtreeGinExtension(),
        migrations.CreateModel(
            name="MusicWork",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "iswc",
                    models.CharField(db_index=True,
                                     max_length=11,
                                     null=True,
                                     unique=True),
                ),
                ("title", models.CharField(db_index=True, max_length=300)),
                (
                    "contributors",
                    django.contrib.postgres.fields.ArrayField(
                        base_field=models.CharField(max_length=200),
                        size=None),
                ),
            ],
        ),
        migrations.AddIndex(
            model_name="musicwork",
            index=django.contrib.postgres.indexes.GinIndex(
                fields=["contributors"],
                name="works_music_contrib_324132_gin"),
        ),
    ]
Exemplo n.º 26
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [

        BtreeGinExtension(),

        migrations.CreateModel(
            name='Work',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('vendor_id', models.PositiveIntegerField(unique=True)),
                ('authors', models.CharField(max_length=500)),
                ('title', models.CharField(max_length=500)),
            ],
        ),
        migrations.CreateModel(
            name='Row',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ordinal', models.PositiveIntegerField()),
                ('content', models.TextField()),
                ('sv', django.contrib.postgres.search.SearchVectorField()),
                ('work', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='rows', to='stuff.Work')),
            ],
            options={
                'ordering': ('work', 'ordinal'),
            },
        ),
        migrations.AddIndex(
            model_name='row',
            index=django.contrib.postgres.indexes.GinIndex(fields=['sv'], name='stuff_row_sv_82bcfb_gin'),
        ),
        migrations.AlterUniqueTogether(
            name='row',
            unique_together={('work', 'ordinal')},
        ),
    ]
Exemplo n.º 27
0
class Migration(migrations.Migration):

    dependencies = [
        ('ingest', '0018_remove_ingest_data_type'),
    ]

    operations = [
        BtreeGinExtension(),
        migrations.AddIndex(
            model_name='ingest',
            index=django.contrib.postgres.indexes.GinIndex(
                fields=['file_name'], name='ingest_file_na_53a40a_gin'),
        ),
        migrations.AlterField(
            model_name='scan',
            name='name',
            field=models.CharField(db_index=True, max_length=50, unique=True),
        ),
        migrations.AddIndex(
            model_name='scan',
            index=django.contrib.postgres.indexes.GinIndex(
                fields=['name'], name='scan_name_c7062e_gin'),
        ),
    ]
Exemplo n.º 28
0
class Migration(migrations.Migration):

    dependencies = [
        ('api', '0066_make_period_start_date_editable'),
    ]

    operations = [
        BtreeGinExtension(),
        migrations.CreateModel(
            name='FacilityIndex',
            fields=[
                ('id',
                 models.CharField(db_index=True,
                                  editable=False,
                                  help_text='The OAR ID of a facility.',
                                  max_length=32,
                                  primary_key=True,
                                  serialize=False)),
                ('name',
                 models.CharField(db_index=True,
                                  help_text='The name of the facility.',
                                  max_length=200)),
                ('country_code',
                 models.CharField(
                     choices=[('AF', 'Afghanistan'), ('AX', 'Åland Islands'),
                              ('AL', 'Albania'), ('DZ', 'Algeria'),
                              ('AS', 'American Samoa'), ('AD', 'Andorra'),
                              ('AO', 'Angola'), ('AI', 'Anguilla'),
                              ('AQ', 'Antarctica'),
                              ('AG', 'Antigua and Barbuda'),
                              ('AR', 'Argentina'), ('AM', 'Armenia'),
                              ('AW', 'Aruba'), ('AU', 'Australia'),
                              ('AT', 'Austria'), ('AZ', 'Azerbaijan'),
                              ('BS', 'Bahamas'), ('BH', 'Bahrain'),
                              ('BD', 'Bangladesh'), ('BB', 'Barbados'),
                              ('BY', 'Belarus'), ('BE', 'Belgium'),
                              ('BZ', 'Belize'), ('BJ', 'Benin'),
                              ('BM', 'Bermuda'), ('BT', 'Bhutan'),
                              ('BO', 'Bolivia, Plurinational State of'),
                              ('BQ', 'Bonaire, Sint Eustatius and Saba'),
                              ('BA', 'Bosnia and Herzegovina'),
                              ('BW', 'Botswana'), ('BV', 'Bouvet Island'),
                              ('BR', 'Brazil'),
                              ('IO', 'British Indian Ocean Territory'),
                              ('BN', 'Brunei Darussalam'), ('BG', 'Bulgaria'),
                              ('BF', 'Burkina Faso'), ('BI', 'Burundi'),
                              ('KH', 'Cambodia'), ('CM', 'Cameroon'),
                              ('CA', 'Canada'), ('CV', 'Cape Verde'),
                              ('KY', 'Cayman Islands'),
                              ('CF', 'Central African Republic'),
                              ('TD', 'Chad'), ('CL', 'Chile'), ('CN', 'China'),
                              ('CX', 'Christmas Island'),
                              ('CC', 'Cocos (Keeling) Islands'),
                              ('CO', 'Colombia'), ('KM', 'Comoros'),
                              ('CG', 'Congo'),
                              ('CD', 'Congo, the Democratic Republic of the'),
                              ('CK', 'Cook Islands'), ('CR', 'Costa Rica'),
                              ('CI', "Côte d'Ivoire"), ('HR', 'Croatia'),
                              ('CU', 'Cuba'), ('CW', 'Curacao'),
                              ('CY', 'Cyprus'), ('CZ', 'Czech Republic'),
                              ('DK', 'Denmark'), ('DJ', 'Djibouti'),
                              ('DM', 'Dominica'), ('DO', 'Dominican Republic'),
                              ('EC', 'Ecuador'), ('EG', 'Egypt'),
                              ('SV', 'El Salvador'),
                              ('GQ', 'Equatorial Guinea'), ('ER', 'Eritrea'),
                              ('EE', 'Estonia'), ('ET', 'Ethiopia'),
                              ('FK', 'Falkland Islands (Malvinas)'),
                              ('FO', 'Faroe Islands'), ('FJ', 'Fiji'),
                              ('FI', 'Finland'), ('FR', 'France'),
                              ('GF', 'French Guiana'),
                              ('PF', 'French Polynesia'),
                              ('TF', 'French Southern Territories'),
                              ('GA', 'Gabon'), ('GM', 'Gambia'),
                              ('GE', 'Georgia'), ('DE', 'Germany'),
                              ('GH', 'Ghana'), ('GI', 'Gibraltar'),
                              ('GR', 'Greece'), ('GL', 'Greenland'),
                              ('GD', 'Grenada'), ('GP', 'Guadeloupe'),
                              ('GU', 'Guam'), ('GT', 'Guatemala'),
                              ('GG', 'Guernsey'), ('GN', 'Guinea'),
                              ('GW', 'Guinea-Bissau'), ('GY', 'Guyana'),
                              ('HT', 'Haiti'),
                              ('HM', 'Heard Island and McDonald Islands'),
                              ('VA', 'Holy See (Vatican City State)'),
                              ('HN', 'Honduras'), ('HK', 'Hong Kong'),
                              ('HU', 'Hungary'), ('IS', 'Iceland'),
                              ('IN', 'India'), ('ID', 'Indonesia'),
                              ('IR', 'Iran, Islamic Republic of'),
                              ('IQ', 'Iraq'), ('IE', 'Ireland'),
                              ('IM', 'Isle of Man'), ('IL', 'Israel'),
                              ('IT', 'Italy'), ('JM', 'Jamaica'),
                              ('JP', 'Japan'), ('JE', 'Jersey'),
                              ('JO', 'Jordan'), ('KZ', 'Kazakhstan'),
                              ('KE', 'Kenya'), ('KI', 'Kiribati'),
                              ('KP', "Korea, Democratic People's Republic of"),
                              ('KR', 'Korea, Republic of'), ('XK', 'Kosovo'),
                              ('KW', 'Kuwait'), ('KG', 'Kyrgyzstan'),
                              ('LA', "Lao People's Democratic Republic"),
                              ('LV', 'Latvia'), ('LB', 'Lebanon'),
                              ('LS', 'Lesotho'), ('LR', 'Liberia'),
                              ('LY', 'Libya'), ('LI', 'Liechtenstein'),
                              ('LT', 'Lithuania'), ('LU', 'Luxembourg'),
                              ('MO', 'Macao'), ('MG', 'Madagascar'),
                              ('MW', 'Malawi'), ('MY', 'Malaysia'),
                              ('MV', 'Maldives'), ('ML', 'Mali'),
                              ('MT', 'Malta'), ('MH', 'Marshall Islands'),
                              ('MQ', 'Martinique'), ('MR', 'Mauritania'),
                              ('MU', 'Mauritius'), ('YT', 'Mayotte'),
                              ('MX', 'Mexico'),
                              ('FM', 'Micronesia, Federated States of'),
                              ('MD', 'Moldova, Republic of'), ('MC', 'Monaco'),
                              ('MN', 'Mongolia'), ('ME', 'Montenegro'),
                              ('MS', 'Montserrat'), ('MA', 'Morocco'),
                              ('MZ', 'Mozambique'), ('MM', 'Myanmar'),
                              ('NA', 'Namibia'), ('NR', 'Nauru'),
                              ('NP', 'Nepal'), ('NL', 'Netherlands'),
                              ('NC', 'New Caledonia'), ('NZ', 'New Zealand'),
                              ('NI', 'Nicaragua'), ('NE', 'Niger'),
                              ('NG', 'Nigeria'), ('NU', 'Niue'),
                              ('NF', 'Norfolk Island'),
                              ('MK', 'North Macedonia'),
                              ('MP', 'Northern Mariana Islands'),
                              ('NO', 'Norway'), ('OM', 'Oman'),
                              ('PK', 'Pakistan'), ('PW', 'Palau'),
                              ('PS', 'Palestine, State of'), ('PA', 'Panama'),
                              ('PG', 'Papua New Guinea'), ('PY', 'Paraguay'),
                              ('PE', 'Peru'), ('PH', 'Philippines'),
                              ('PN', 'Pitcairn'), ('PL', 'Poland'),
                              ('PT', 'Portugal'), ('PR', 'Puerto Rico'),
                              ('QA', 'Qatar'), ('RE', 'Reunion'),
                              ('RO', 'Romania'), ('RU', 'Russian Federation'),
                              ('RW', 'Rwanda'), ('BL', 'Saint Barthelemy'),
                              ('SH',
                               'Saint Helena, Ascension and Tristan da Cunha'),
                              ('KN', 'Saint Kitts and Nevis'),
                              ('LC', 'Saint Lucia'),
                              ('MF', 'Saint Martin (French part)'),
                              ('PM', 'Saint Pierre and Miquelon'),
                              ('VC', 'Saint Vincent and the Grenadines'),
                              ('WS', 'Samoa'), ('SM', 'San Marino'),
                              ('ST',
                               'Sao Tome and Principe,Sao Tome And Principe'),
                              ('SA', 'Saudi Arabia'), ('SN', 'Senegal'),
                              ('RS', 'Serbia'), ('SC', 'Seychelles'),
                              ('SL', 'Sierra Leone'), ('SG', 'Singapore'),
                              ('SX', 'Sint Maarten (Dutch part)'),
                              ('SK', 'Slovakia'), ('SI', 'Slovenia'),
                              ('SB', 'Solomon Islands'), ('SO', 'Somalia'),
                              ('ZA', 'South Africa'),
                              ('GS',
                               'South Georgia and the South Sandwich Islands'),
                              ('SS', 'South Sudan'), ('ES', 'Spain'),
                              ('LK', 'Sri Lanka'), ('SD', 'Sudan'),
                              ('SR', 'Suriname'),
                              ('SJ', 'Svalbard and Jan Mayen'),
                              ('SZ', 'Swaziland'), ('SE', 'Sweden'),
                              ('CH', 'Switzerland'),
                              ('SY', 'Syrian Arab Republic'), ('TW', 'Taiwan'),
                              ('TJ', 'Tajikistan'),
                              ('TZ', 'Tanzania, United Republic of'),
                              ('TH', 'Thailand'), ('TL', 'Timor-Leste'),
                              ('TG', 'Togo'), ('TK', 'Tokelau'),
                              ('TO', 'Tonga'), ('TT', 'Trinidad and Tobago'),
                              ('TN', 'Tunisia'), ('TR', 'Turkey'),
                              ('TM', 'Turkmenistan'),
                              ('TC', 'Turks and Caicos Islands'),
                              ('TV', 'Tuvalu'), ('UG', 'Uganda'),
                              ('UA', 'Ukraine'), ('AE',
                                                  'United Arab Emirates'),
                              ('GB', 'United Kingdom'), ('US',
                                                         'United States'),
                              ('UM', 'United States Minor Outlying Islands'),
                              ('UY', 'Uruguay'), ('UZ', 'Uzbekistan'),
                              ('VU', 'Vanuatu'),
                              ('VE', 'Venezuela, Bolivarian Republic of'),
                              ('VN', 'Vietnam'),
                              ('VG', 'Virgin Islands, British'),
                              ('VI', 'Virgin Islands, U.S.'),
                              ('WF', 'Wallis and Futuna'),
                              ('EH', 'Western Sahara'), ('YE', 'Yemen'),
                              ('ZM', 'Zambia'), ('ZW', 'Zimbabwe')],
                     db_index=True,
                     help_text=
                     'The ISO 3166-1 alpha-2 country code of the facility.',
                     max_length=2)),
                ('location',
                 django.contrib.gis.db.models.fields.PointField(
                     db_index=True,
                     help_text='The lat/lng point location of the facility',
                     srid=4326)),
                ('contrib_types',
                 django.contrib.postgres.fields.
                 ArrayField(base_field=models.CharField(
                     choices=
                     [('Academic / Researcher / Journalist / Student',
                       'Academic / Researcher / Journalist / Student'),
                      ('Auditor / Certification Scheme / Service Provider',
                       'Auditor / Certification Scheme / Service Provider'),
                      ('Brand / Retailer', 'Brand / Retailer'),
                      ('Civil Society Organization',
                       'Civil Society Organization'),
                      ('Facility / Factory / Manufacturing Group / Supplier / Vendor',
                       'Facility / Factory / Manufacturing Group / Supplier / Vendor'
                       ),
                      ('Multi-Stakeholder Initiative',
                       'Multi-Stakeholder Initiative'), ('Union', 'Union'),
                      ('Other', 'Other')],
                     help_text=
                     'The categories to which the contributors belong.',
                     max_length=200,
                     null=True),
                            size=None)),
                ('contributors',
                 django.contrib.postgres.fields.ArrayField(
                     base_field=models.IntegerField(
                         help_text=
                         'The contributor who submitted the facility data.',
                         null=True),
                     size=None)),
                ('ppe',
                 models.TextField(
                     help_text=
                     'A type of personal protective equipment produced at the facility',
                     null=True,
                     verbose_name='ppe product type')),
                ('lists',
                 django.contrib.postgres.fields.ArrayField(
                     base_field=models.IntegerField(
                         editable=False,
                         help_text=
                         'The related list if the type of the source is LIST.',
                         null=True),
                     size=None)),
            ],
        ),
        migrations.AddIndex(
            model_name='facilityindex',
            index=django.contrib.postgres.indexes.GinIndex(
                fields=['contrib_types', 'contributors', 'lists'],
                name='api_facilit_contrib_aa2da8_gin'),
        ),
    ]
Exemplo n.º 29
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        BtreeGinExtension(),
        migrations.CreateModel(
            name='Film',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(db_index=True, max_length=150)),
                ('description', models.TextField(verbose_name='Описание')),
                ('poster',
                 models.ImageField(upload_to='films/', verbose_name='Постер')),
                ('year',
                 models.PositiveSmallIntegerField(default=2000,
                                                  verbose_name='Дата выхода')),
                ('country',
                 models.CharField(max_length=150, verbose_name='Страна')),
                ('url', models.SlugField(max_length=160, unique=True)),
            ],
            options={
                'verbose_name': 'Фильм',
                'verbose_name_plural': 'Фильмы',
            },
        ),
        migrations.CreateModel(
            name='Genre',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=150,
                                          verbose_name='Жанр')),
                ('description', models.TextField(verbose_name='Описание')),
            ],
            options={
                'verbose_name': 'Жанр',
                'verbose_name_plural': 'Жанры',
            },
        ),
        migrations.CreateModel(
            name='Person',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=150, verbose_name='Имя')),
                ('age',
                 models.PositiveSmallIntegerField(default=0,
                                                  verbose_name='Возраст')),
                ('description', models.TextField(verbose_name='Описание')),
            ],
            options={
                'verbose_name': 'Актёры и режиссёры',
                'verbose_name_plural': 'Актёры и режиссёры',
            },
        ),
        migrations.CreateModel(
            name='Revision',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=150, verbose_name='Имя')),
                ('text', models.TextField(verbose_name='Отзыв')),
                ('film',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='cinema.Film',
                                   verbose_name='Фильм')),
            ],
            options={
                'verbose_name': 'Отзыв',
                'verbose_name_plural': 'Отзывы',
            },
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('verified',
                 models.BooleanField(default=False,
                                     verbose_name='Подтверждён')),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL,
                     verbose_name='Пользователь')),
            ],
            options={
                'verbose_name': 'Профиль',
                'verbose_name_plural': 'Профили',
            },
        ),
        migrations.CreateModel(
            name='FilmShots',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title',
                 models.CharField(max_length=150, verbose_name='Название')),
                ('description', models.TextField(verbose_name='Описание')),
                ('image',
                 models.ImageField(upload_to='film_shots/',
                                   verbose_name='Кадр')),
                ('film',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='cinema.Film',
                                   verbose_name='Фильм')),
            ],
            options={
                'verbose_name': 'Кадр',
                'verbose_name_plural': 'Кадры',
            },
        ),
        migrations.AddField(
            model_name='film',
            name='actors',
            field=models.ManyToManyField(related_name='film_actor',
                                         to='cinema.Person',
                                         verbose_name='актёры'),
        ),
        migrations.AddField(
            model_name='film',
            name='directors',
            field=models.ManyToManyField(related_name='film_diretor',
                                         to='cinema.Person',
                                         verbose_name='режиссёры'),
        ),
        migrations.AddField(
            model_name='film',
            name='genres',
            field=models.ManyToManyField(to='cinema.Genre',
                                         verbose_name='жанры'),
        ),
        migrations.AddIndex(
            model_name='film',
            index=django.contrib.postgres.indexes.GinIndex(
                fields=['title'], name='cinema_film_title_a01bc0_gin'),
        ),
    ]
Exemplo n.º 30
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        BtreeGinExtension(),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=80,
                                  verbose_name='Наименование категории')),
                ('slug',
                 models.SlugField(max_length=150,
                                  unique=True,
                                  verbose_name='ЧПУ')),
                ('root_category',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='bid.Category',
                                   verbose_name='Родительская категория')),
            ],
            options={
                'verbose_name': 'Категория',
                'verbose_name_plural': 'Категории',
            },
        ),
        migrations.CreateModel(
            name='ProductMatrix',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=50,
                                  verbose_name='Наименование матрицы')),
            ],
            options={
                'verbose_name': 'Матрица товаров',
                'verbose_name_plural': 'Матрицы товаров',
            },
        ),
        migrations.CreateModel(
            name='Provider',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(db_index=True,
                                  max_length=150,
                                  verbose_name='Наименование организации')),
                ('UNP', models.CharField(max_length=10, verbose_name='УНП')),
                ('branch_code',
                 models.CharField(blank=True,
                                  max_length=4,
                                  null=True,
                                  verbose_name='Код филиала')),
            ],
            options={
                'verbose_name': 'Поставщик',
                'verbose_name_plural': 'Поставщики',
            },
        ),
        migrations.CreateModel(
            name='Stock',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=100,
                                  verbose_name='Наименование склада')),
                ('stock_type',
                 models.CharField(choices=[('O', 'Обычный'),
                                           ('C', 'Склад-холодильник'),
                                           ('F', 'Склад-морозильник')],
                                  default='O',
                                  max_length=1,
                                  verbose_name='Формат объекта')),
            ],
            options={
                'verbose_name': 'Склад',
                'verbose_name_plural': 'Склады',
            },
        ),
        migrations.CreateModel(
            name='Unit',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(
                     max_length=30,
                     verbose_name='Полное наименование меры исчисления')),
                ('short_name',
                 models.CharField(
                     max_length=10,
                     verbose_name='Краткое наименование меры исчисления')),
                ('type',
                 models.CharField(choices=[('W', 'Весовой'), ('P', 'Штучный')],
                                  default='P',
                                  max_length=1,
                                  verbose_name='Тип единицы измерения')),
            ],
            options={
                'verbose_name': 'Мера исчисления',
                'verbose_name_plural': 'Меры исчисления',
            },
        ),
        migrations.CreateModel(
            name='Shop',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(db_index=True,
                                  max_length=150,
                                  verbose_name='Наименование организации')),
                ('UNP', models.CharField(max_length=10, verbose_name='УНП')),
                ('branch_code',
                 models.CharField(blank=True,
                                  max_length=4,
                                  null=True,
                                  verbose_name='Код филиала')),
                ('address',
                 models.CharField(max_length=150, verbose_name='Адрес')),
                ('product_matrix',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to='bid.ProductMatrix',
                                   verbose_name='Матрица товаров')),
                ('stock',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to='bid.Stock',
                                   verbose_name='Склад')),
            ],
            options={
                'verbose_name': 'Торговый объект',
                'verbose_name_plural': 'Торговые объекты',
            },
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('barcode',
                 models.CharField(max_length=13,
                                  unique=True,
                                  verbose_name='Штрих-код')),
                ('name',
                 models.CharField(max_length=150,
                                  verbose_name='Наименование товара')),
                ('slug',
                 models.SlugField(max_length=150,
                                  unique=True,
                                  verbose_name='ЧПУ')),
                ('price',
                 models.DecimalField(decimal_places=2,
                                     max_digits=10,
                                     verbose_name='Цена')),
                ('storage_condition',
                 models.CharField(choices=[('O', 'Обычное'),
                                           ('C', 'Охлаждённое'),
                                           ('F', 'Замороженное')],
                                  default='O',
                                  max_length=1,
                                  verbose_name='Состояние хранения')),
                ('created_at',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='Дата создания')),
                ('updated_at',
                 models.DateTimeField(auto_now=True,
                                      verbose_name='Дата обновления')),
                ('category',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to='bid.Category',
                                   verbose_name='Категория')),
                ('matrix',
                 models.ManyToManyField(to='bid.ProductMatrix',
                                        verbose_name='Матрица товаров')),
                ('unit',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to='bid.Unit',
                                   verbose_name='Мера исчисления')),
            ],
            options={
                'verbose_name': 'Товар',
                'verbose_name_plural': 'Товары',
                'ordering': ('name', ),
            },
        ),
        migrations.AddIndex(
            model_name='product',
            index=django.contrib.postgres.indexes.GinIndex(
                fields=['barcode', 'name'],
                name='bid_product_barcode_d4e845_gin'),
        ),
    ]