# Generated by Django 3.1.3 on 2020-11-11 07:04

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('core', '0002_country_genre_show'),
    ]

    operations = [
        migrations.CreateModel(
            name='RankingHistory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ranking', models.IntegerField()),
                ('updated', models.DateTimeField(auto_now_add=True)),
                ('country', models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, related_name='ranking_history', to='core.country')),
                ('genre', models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, related_name='ranking_history', to='core.genre')),
                ('show', models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, related_name='ranking_history', to='core.show')),
            ],
            options={
                'db_table': 'podminer_ranking_history',
                'default_related_name': 'ranking_history',
            },
        ),
        migrations.CreateModel(
            name='Ranking',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ranking', models.IntegerField()),
                ('updated', models.DateTimeField(auto_now_add=True)),
                ('country', models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, related_name='rankings', to='core.country')),
                ('genre', models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, related_name='rankings', to='core.genre')),
                ('show', models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, related_name='rankings', to='core.show')),
            ],
            options={
                'db_table': 'podminer_rankings',
                'default_related_name': 'rankings',
                'unique_together': {('country', 'ranking', 'genre')},
            },
        ),
    ]
