# Generated by Django 3.1.1 on 2020-09-06 18:27

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


class Migration(migrations.Migration):

    dependencies = [
        ('art_gallery_app', '0002_auto_20200906_2209'),
    ]

    operations = [
        migrations.CreateModel(
            name='Gallery',
            fields=[
                ('gallery_id', models.IntegerField(primary_key=True, serialize=False)),
                ('gallery_name', models.CharField(max_length=200)),
                ('location', models.CharField(max_length=200)),
            ],
        ),
        migrations.AlterField(
            model_name='artist',
            name='artist_id',
            field=models.IntegerField(primary_key=True, serialize=False),
        ),
        migrations.CreateModel(
            name='Painting',
            fields=[
                ('painting_id', models.IntegerField(primary_key=True, serialize=False)),
                ('painting_name', models.CharField(max_length=200)),
                ('genre', models.CharField(max_length=200)),
                ('year_of_publish', models.DateField()),
                ('price', models.IntegerField()),
                ('rating', models.IntegerField()),
                ('painting_url', models.CharField(max_length=200)),
                ('description', models.CharField(max_length=200)),
                ('artist_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='artist_id_fk', to='art_gallery_app.artist')),
            ],
        ),
        migrations.CreateModel(
            name='Exhibition',
            fields=[
                ('exhibition_id', models.IntegerField(primary_key=True, serialize=False)),
                ('exhibition_name', models.CharField(max_length=200)),
                ('start_date', models.DateField()),
                ('end_date', models.DateField()),
                ('gallery_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='gallery_id_fk', to='art_gallery_app.gallery')),
            ],
        ),
        migrations.CreateModel(
            name='Exhibition_Painting',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('exhibition_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='exhibition_id_fk', to='art_gallery_app.exhibition')),
                ('painting_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='painting_id_fk', to='art_gallery_app.painting')),
            ],
            options={
                'unique_together': {('painting_id', 'exhibition_id')},
            },
        ),
    ]
