text: # Generated by Django 3.1 on 2020-08-05 12:07
  
  from django.db import migrations, models
  import django.db.models.deletion
  import taggit.managers
  
  
  class Migration(migrations.Migration):
  
      initial = True
  
      dependencies = [
          ('taggit', '0003_taggeditem_add_unique_index'),
      ]
  
      operations = [
          migrations.CreateModel(
              name='Painting',
              fields=[
                  (
                      'id',
                      models.AutoField(
                          auto_created=True,
                          primary_key=True,
                          serialize=False,
                          verbose_name='ID',
                      ),
                  ),
                  ('description', models.TextField()),
                  ('name', models.CharField(max_length=150)),
                  ('width', models.PositiveSmallIntegerField()),
                  ('height', models.PositiveSmallIntegerField()),
                  ('price', models.PositiveIntegerField(default=10000)),
                  ('extra_data', models.JSONField(blank=True, null=True)),
                  (
                      'tags',
                      taggit.managers.TaggableManager(
                          blank=True,
                          help_text='A comma-separated list of tags.',
                          through='taggit.TaggedItem',
                          to='taggit.Tag',
                          verbose_name='Tags',
                      ),
                  ),
              ],
              options={'ordering': ('-pk',),},
          ),
          migrations.CreateModel(
              name='Image',
              fields=[
                  (
                      'id',
                      models.AutoField(
                          auto_created=True,
                          primary_key=True,
                          serialize=False,
                          verbose_name='ID',
                      ),
                  ),
                  ('file', models.ImageField(upload_to='images')),
                  ('caption', models.CharField(blank=True, max_length=175, null=True)),
                  (
                      'painting',
                      models.ForeignKey(
                          on_delete=django.db.models.deletion.CASCADE,
                          related_name='images',
                          to='shop.painting',
                      ),
                  ),
              ],
          ),
          migrations.AddIndex(
              model_name='painting',
              index=models.Index(fields=['price'], name='shop_painti_price_ec1f80_idx'),
          ),
          migrations.AddIndex(
              model_name='image',
              index=models.Index(
                  fields=['painting'], name='shop_image_paintin_9e0a8d_idx'
              ),
          ),
      ]
  