# Generated by Django 2.0.3 on 2018-04-16 18:54

from django.db import migrations


def migrate(apps, schema_editor):
    Organization = apps.get_model('admin', 'Organization')
    Unit = apps.get_model('admin', 'Unit')

    if Organization.__subclasses__() or Unit.__subclasses__():
        print('\nExecute the following command if you are using sqlite3')
        print('echo .dump | sqlite3 sqlite.db > x.sql && sed \'s/"scope_ptr"/"scope_ptr_id"/g\' x.sql > y.sql && rm x.sql sqlite.db && sqlite3 sqlite.db < y.sql && rm y.sql\n')


class Migration(migrations.Migration):

    dependencies = [
        ('admin', '0006_auto_20180416_1058'),
    ]

    operations = [
        migrations.RunPython(migrate)
    ]
