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


class Migration(migrations.Migration):

    dependencies = [
        ('wagtailcore', '0040_page_draft_title'),
        ('wagtail_embed_videos', '0001_initial'),
    ]

    operations = [
        migrations.AddField(
            model_name='embedvideo',
            name='collection',
            field=models.ForeignKey(default=wagtail.core.models.get_root_collection_id, on_delete=django.db.models.deletion.CASCADE, related_name='+', to='wagtailcore.Collection', verbose_name='collection'),
        ),
        migrations.AlterField(
            model_name='embedvideo',
            name='created_at',
            field=models.DateTimeField(auto_now_add=True, verbose_name='Created'),
        ),
        migrations.AlterField(
            model_name='embedvideo',
            name='uploaded_by_user',
            field=models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='Uploader'),
        ),
    ]


from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
from wagtail.wagtailcore.models import Collection


class Migration(migrations.Migration):

    dependencies = [
        ('wagtailcore', '0040_page_draft_title'),
        ('wagtail_embed_videos', '0001_initial'),
    ]

    operations = [
        migrations.AddField(
            model_name='embedvideo',
            name='collection',
            field=models.ForeignKey(default=wagtail.core.models.get_root_collection_id, on_delete=django.db.models.deletion.CASCADE, related_name='+', to='wagtailcore.Collection', verbose_name='collection'),
        ),
        migrations.AlterField(
            model_name='embedvideo',
            name='created_at',
            field=models.DateTimeField(auto_now_add=True, verbose_name='Created'),
        ),
        migrations.AlterField(
            model_name='embedvideo',
            name='uploaded_by_user',
            field=models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='Uploader'),
        ),
    ]

Change importing in order to make Wagtail<2.0 comp
Change importing in order to make Wagtail<2.0 comp
  
  from django.conf import settings
  from django.db import migrations, models
  import django.db.models.deletion
- import wagtail.core.models
+ from wagtail.wagtailcore.models import Collection
  
  
  class Migration(migrations.Migration):
  
      dependencies = [
          ('wagtailcore', '0040_page_draft_title'),
          ('wagtail_embed_videos', '0001_initial'),
      ]
  
      operations = [
          migrations.AddField(
              model_name='embedvideo',
              name='collection',
              field=models.ForeignKey(default=wagtail.core.models.get_root_collection_id, on_delete=django.db.models.deletion.CASCADE, related_name='+', to='wagtailcore.Collection', verbose_name='collection'),
          ),
          migrations.AlterField(
              model_name='embedvideo',
              name='created_at',
              field=models.DateTimeField(auto_now_add=True, verbose_name='Created'),
          ),
          migrations.AlterField(
              model_name='embedvideo',
              name='uploaded_by_user',
              field=models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='Uploader'),
          ),
      ]
  
Change importing in order to make Wagtail<2.0 comp
## Code Before:

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


class Migration(migrations.Migration):

    dependencies = [
        ('wagtailcore', '0040_page_draft_title'),
        ('wagtail_embed_videos', '0001_initial'),
    ]

    operations = [
        migrations.AddField(
            model_name='embedvideo',
            name='collection',
            field=models.ForeignKey(default=wagtail.core.models.get_root_collection_id, on_delete=django.db.models.deletion.CASCADE, related_name='+', to='wagtailcore.Collection', verbose_name='collection'),
        ),
        migrations.AlterField(
            model_name='embedvideo',
            name='created_at',
            field=models.DateTimeField(auto_now_add=True, verbose_name='Created'),
        ),
        migrations.AlterField(
            model_name='embedvideo',
            name='uploaded_by_user',
            field=models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='Uploader'),
        ),
    ]

## Instruction:
Change importing in order to make Wagtail<2.0 comp
## Code After:

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
from wagtail.wagtailcore.models import Collection


class Migration(migrations.Migration):

    dependencies = [
        ('wagtailcore', '0040_page_draft_title'),
        ('wagtail_embed_videos', '0001_initial'),
    ]

    operations = [
        migrations.AddField(
            model_name='embedvideo',
            name='collection',
            field=models.ForeignKey(default=wagtail.core.models.get_root_collection_id, on_delete=django.db.models.deletion.CASCADE, related_name='+', to='wagtailcore.Collection', verbose_name='collection'),
        ),
        migrations.AlterField(
            model_name='embedvideo',
            name='created_at',
            field=models.DateTimeField(auto_now_add=True, verbose_name='Created'),
        ),
        migrations.AlterField(
            model_name='embedvideo',
            name='uploaded_by_user',
            field=models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='Uploader'),
        ),
    ]
