# -*- coding: utf-8 -*-
# Generated by Django 1.11.11 on 2018-04-08 15:49
from __future__ import unicode_literals

from django.db import migrations, models
from django.db.models import F
from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor
from django.db.migrations.state import StateApps

def migrate_set_order_value(apps: StateApps, schema_editor: DatabaseSchemaEditor) -> None:
    CustomProfileField = apps.get_model('zerver', 'CustomProfileField')
    CustomProfileField.objects.all().update(order=F('id'))

class Migration(migrations.Migration):

    dependencies = [
        ('zerver', '0166_add_url_to_profile_field'),
    ]

    operations = [
        migrations.AddField(
            model_name='customprofilefield',
            name='order',
            field=models.IntegerField(default=0),
        ),
        migrations.RunPython(migrate_set_order_value),
    ]

# -*- coding: utf-8 -*-
# Generated by Django 1.11.11 on 2018-04-08 15:49
from __future__ import unicode_literals

from django.db import migrations, models
from django.db.models import F
from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor
from django.db.migrations.state import StateApps

def migrate_set_order_value(apps: StateApps, schema_editor: DatabaseSchemaEditor) -> None:
    CustomProfileField = apps.get_model('zerver', 'CustomProfileField')
    CustomProfileField.objects.all().update(order=F('id'))

class Migration(migrations.Migration):

    dependencies = [
        ('zerver', '0166_add_url_to_profile_field'),
    ]

    operations = [
        migrations.AddField(
            model_name='customprofilefield',
            name='order',
            field=models.IntegerField(default=0),
        ),
        migrations.RunPython(migrate_set_order_value,
                             reverse_code=migrations.RunPython.noop),
    ]

Add missing reverse_code for migration 0167.
migrations: Add missing reverse_code for migration 0167.
