# Generated by Django 3.1.12 on 2021-06-04 12:06

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


class Migration(migrations.Migration):

    dependencies = [
        ('contenttypes', '0002_remove_content_type_name'),
        ('app', '0002_auto_20201007_1210'),
    ]

    operations = [
        migrations.CreateModel(
            name='NamedGenericManyToManyModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
        ),
        migrations.AlterUniqueTogether(
            name='genericmanytomanymodelgenericmanytomanyrelation',
            unique_together={('generic_many_to_many_model', 'object_ct', 'object_id')},
        ),
        migrations.CreateModel(
            name='NamedGenericManyToManyModelGenericManyToManyRelation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True, db_index=True, verbose_name='created at')),
                ('changed_at', models.DateTimeField(auto_now=True, db_index=True, verbose_name='changed at')),
                ('object_id', models.TextField(db_index=True, verbose_name='ID of the related object')),
                ('name', models.CharField(db_index=True, max_length=200, verbose_name='name')),
                ('named_generic_many_to_many_model', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='_related_objects', related_query_name='related_objects', to='app.namedgenericmanytomanymodel')),
                ('object_ct', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.contenttype', verbose_name='content type of the related object')),
            ],
            options={
                'db_tablespace': '',
                'unique_together': {('named_generic_many_to_many_model', 'name')},
            },
        ),
    ]
