# Generated by Django 2.2.16 on 2021-03-31 17:48

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


class Migration(migrations.Migration):

    dependencies = [
        ('contenttypes', '0002_remove_content_type_name'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('course_flow', '0053_auto_20210318_2131'),
    ]

    operations = [
        migrations.CreateModel(
            name='Favourite',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('object_id', models.PositiveIntegerField()),
                ('content_type', models.ForeignKey(limit_choices_to={'model__in': ['project', 'activity', 'course', 'program', 'outcome']}, on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='ObjectPermission',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('object_id', models.PositiveIntegerField()),
                ('permission_type', models.PositiveIntegerField(choices=[(0, 'None'), (1, 'View'), (2, 'Edit')], default=0)),
                ('content_type', models.ForeignKey(limit_choices_to={'model__in': ['project', 'activity', 'course', 'program', 'outcome']}, on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.RemoveField(
            model_name='coursefavourite',
            name='course',
        ),
        migrations.RemoveField(
            model_name='coursefavourite',
            name='user',
        ),
        migrations.RemoveField(
            model_name='outcomefavourite',
            name='outcome',
        ),
        migrations.RemoveField(
            model_name='outcomefavourite',
            name='user',
        ),
        migrations.RemoveField(
            model_name='programfavourite',
            name='program',
        ),
        migrations.RemoveField(
            model_name='programfavourite',
            name='user',
        ),
        migrations.RemoveField(
            model_name='projectfavourite',
            name='project',
        ),
        migrations.RemoveField(
            model_name='projectfavourite',
            name='user',
        ),
        migrations.DeleteModel(
            name='ActivityFavourite',
        ),
        migrations.DeleteModel(
            name='CourseFavourite',
        ),
        migrations.DeleteModel(
            name='OutcomeFavourite',
        ),
        migrations.DeleteModel(
            name='ProgramFavourite',
        ),
        migrations.DeleteModel(
            name='ProjectFavourite',
        ),
    ]

# Generated by Django 2.2.16 on 2021-03-31 17:48

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


class Migration(migrations.Migration):

    dependencies = [
        ('contenttypes', '0002_remove_content_type_name'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('course_flow', '0053_auto_20210318_2131'),
    ]

    operations = [
        migrations.CreateModel(
            name='Favourite',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('object_id', models.PositiveIntegerField()),
                ('content_type', models.ForeignKey(limit_choices_to={'model__in': ['project', 'activity', 'course', 'program', 'outcome']}, on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='ObjectPermission',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('object_id', models.PositiveIntegerField()),
                ('permission_type', models.PositiveIntegerField(choices=[(0, 'None'), (1, 'View'), (2, 'Edit')], default=0)),
                ('content_type', models.ForeignKey(limit_choices_to={'model__in': ['project', 'activity', 'course', 'program', 'outcome']}, on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.RemoveField(
            model_name='coursefavourite',
            name='course',
        ),
        migrations.RemoveField(
            model_name='coursefavourite',
            name='user',
        ),
        migrations.RemoveField(
            model_name='outcomefavourite',
            name='outcome',
        ),
        migrations.RemoveField(
            model_name='outcomefavourite',
            name='user',
        ),
        migrations.RemoveField(
            model_name='programfavourite',
            name='program',
        ),
        migrations.RemoveField(
            model_name='programfavourite',
            name='user',
        ),
        migrations.RemoveField(
            model_name='projectfavourite',
            name='project',
        ),
        migrations.RemoveField(
            model_name='projectfavourite',
            name='user',
        ),
        migrations.DeleteModel(
            name='ActivityFavourite',
        ),
        migrations.DeleteModel(
            name='CourseFavourite',
        ),
        migrations.DeleteModel(
            name='OutcomeFavourite',
        ),
        migrations.DeleteModel(
            name='ProgramFavourite',
        ),
        migrations.DeleteModel(
            name='ProjectFavourite',
        ),
    ]

# Generated by Django 2.2.16 on 2021-03-31 17:48