# Generated by Django 2.2.7 on 2019-11-19 07:17

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


def forward(apps, schema_editor):
    Scene = apps.get_model("terra_layer", "Scene")
    Scene.objects.update(order=F("pk"))


class Migration(migrations.Migration):
    dependencies = [
        ("terra_layer", "0043_layer_active_by_default"),
    ]

    operations = [
        migrations.AlterModelOptions(name="scene", options={"ordering": ["order"]}),
        migrations.AddField(
            model_name="scene",
            name="order",
            field=models.IntegerField(db_index=True, default=0),
        ),
        migrations.RunPython(forward, migrations.RunPython.noop),
    ]
