<reponame>cyberjacob/ytsm
# Generated by Django 2.1.2 on 2018-10-11 00:19

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Channel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('channel_id', models.CharField(unique=True, max_length=255)),
                ('username', models.CharField(null=True, unique=True, max_length=255)),
                ('custom_url', models.CharField(null=True, unique=True, max_length=255)),
                ('name', models.CharField(max_length=255)),
                ('description', models.TextField()),
                ('icon_default', models.TextField()),
                ('icon_best', models.TextField()),
                ('upload_playlist_id', models.CharField(max_length=255)),
            ],
        ),
        migrations.CreateModel(
            name='Subscription',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('playlist_id', models.CharField(unique=True, max_length=255)),
                ('description', models.TextField()),
                ('icon_default', models.TextField()),
                ('icon_best', models.TextField()),
                ('auto_download', models.BooleanField(null=True)),
                ('download_limit', models.IntegerField(null=True)),
                ('download_order', models.CharField(null=True, max_length=255)),
                ('manager_delete_after_watched', models.BooleanField(null=True)),
                ('channel', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='YtManagerApp.Channel')),
            ],
        ),
        migrations.CreateModel(
            name='SubscriptionFolder',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='YtManagerApp.SubscriptionFolder')),
            ],
        ),
        migrations.CreateModel(
            name='UserSettings',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('mark_deleted_as_watched', models.BooleanField(null=True)),
                ('delete_watched', models.BooleanField(null=True)),
                ('auto_download', models.BooleanField(null=True)),
                ('download_global_limit', models.IntegerField(null=True)),
                ('download_subscription_limit', models.IntegerField(null=True)),
                ('download_order', models.CharField(null=True, max_length=255)),
                ('download_path', models.TextField(null=True)),
                ('download_file_pattern', models.CharField(null=True, max_length=255)),
                ('download_format', models.CharField(null=True, max_length=255)),
                ('download_subtitles', models.BooleanField(null=True)),
                ('download_autogenerated_subtitles', models.BooleanField(null=True)),
                ('download_subtitles_all', models.BooleanField(null=True)),
                ('download_subtitles_langs', models.CharField(null=True, max_length=255)),
                ('download_subtitles_format', models.CharField(null=True, max_length=255)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Video',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('video_id', models.CharField(max_length=12)),
                ('name', models.CharField(max_length=255)),
                ('description', models.TextField()),
                ('watched', models.BooleanField(default=False)),
                ('downloaded_path', models.TextField(blank=True, null=True)),
                ('playlist_index', models.IntegerField()),
                ('publish_date', models.DateTimeField()),
                ('icon_default', models.TextField()),
                ('icon_best', models.TextField()),
                ('subscription', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='YtManagerApp.Subscription')),
            ],
        ),
        migrations.AddField(
            model_name='subscription',
            name='parent_folder',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='YtManagerApp.SubscriptionFolder'),
        ),
        migrations.AddField(
            model_name='subscription',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
    ]

# Generated by Django 2.1.2 on 2018-10-11 00:19

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Channel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('channel_id', models.CharField(unique=True, max_length=255)),
                ('username', models.CharField(null=True, unique=True, max_length=255)),
                ('custom_url', models.CharField(null=True, unique=True, max_length=255)),
                ('name', models.CharField(max_length=255)),
                ('description', models.TextField()),
                ('icon_default', models.TextField()),
                ('icon_best', models.TextField()),
                ('upload_playlist_id', models.CharField(max_length=255)),
            ],
        ),
        migrations.CreateModel(
            name='Subscription',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('playlist_id', models.CharField(unique=True, max_length=255)),
                ('description', models.TextField()),
                ('icon_default', models.TextField()),
                ('icon_best', models.TextField()),
                ('auto_download', models.BooleanField(null=True)),
                ('download_limit', models.IntegerField(null=True)),
                ('download_order', models.CharField(null=True, max_length=255)),
                ('manager_delete_after_watched', models.BooleanField(null=True)),
                ('channel', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='YtManagerApp.Channel')),
            ],
        ),
        migrations.CreateModel(
            name='SubscriptionFolder',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='YtManagerApp.SubscriptionFolder')),
            ],
        ),
        migrations.CreateModel(
            name='UserSettings',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('mark_deleted_as_watched', models.BooleanField(null=True)),
                ('delete_watched', models.BooleanField(null=True)),
                ('auto_download', models.BooleanField(null=True)),
                ('download_global_limit', models.IntegerField(null=True)),
                ('download_subscription_limit', models.IntegerField(null=True)),
                ('download_order', models.CharField(null=True, max_length=255)),
                ('download_path', models.TextField(null=True)),
                ('download_file_pattern', models.CharField(null=True, max_length=255)),
                ('download_format', models.CharField(null=True, max_length=255)),
                ('download_subtitles', models.BooleanField(null=True)),
                ('download_autogenerated_subtitles', models.BooleanField(null=True)),
                ('download_subtitles_all', models.BooleanField(null=True)),
                ('download_subtitles_langs', models.CharField(null=True, max_length=255)),
                ('download_subtitles_format', models.CharField(null=True, max_length=255)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Video',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('video_id', models.CharField(max_length=12)),
                ('name', models.CharField(max_length=255)),
                ('description', models.TextField()),
                ('watched', models.BooleanField(default=False)),
                ('downloaded_path', models.TextField(blank=True, null=True)),
                ('playlist_index', models.IntegerField()),
                ('publish_date', models.DateTimeField()),
                ('icon_default', models.TextField()),
                ('icon_best', models.TextField()),
                ('subscription', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='YtManagerApp.Subscription')),
            ],
        ),
        migrations.AddField(
            model_name='subscription',
            name='parent_folder',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='YtManagerApp.SubscriptionFolder'),
        ),
        migrations.AddField(
            model_name='subscription',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
    ]
# Generated by Django 2.1.2 on 2018-10-11 00:19