# Generated by Django 3.2.14 on 2022-08-12 08:48
from django.db import migrations


class Migration(migrations.Migration):
    create_views = '''
CREATE VIEW FROM_CONFIG_V as
    SELECT * from FROM_CONFIG;

CREATE VIEW SCHEDULE_CONFIG_V as
    SELECT * from SCHEDULE_CONFIG;

CREATE VIEW SIGN_CONFIG_V as
    SELECT * from SIGN_CONFIG;

CREATE VIEW TURNKEY_SEQUENCE_V as
    SELECT * from TURNKEY_SEQUENCE;

CREATE VIEW TURNKEY_SYSEVENT_LOG_V as
    SELECT * from TURNKEY_SYSEVENT_LOG;

CREATE VIEW TURNKEY_TRANSPORT_CONFIG_V as
    SELECT * from TURNKEY_TRANSPORT_CONFIG;

CREATE VIEW TURNKEY_USER_PROFILE_V as
    SELECT * from TURNKEY_USER_PROFILE;
'''

    dependencies = [
        ('turnkey_wrapper', '0021_eiturnkeybatcheinvoice_result_message'),
    ]

    operations = [
        migrations.RunSQL(create_views),
        migrations.AlterModelTable(
            name='from_config',
            table='FROM_CONFIG_V',
        ),
        migrations.AlterModelTable(
            name='schedule_config',
            table='SCHEDULE_CONFIG_V',
        ),
        migrations.AlterModelTable(
            name='sign_config',
            table='SIGN_CONFIG_V',
        ),
        migrations.AlterModelTable(
            name='turnkey_sequence',
            table='TURNKEY_SEQUENCE_V',
        ),
        migrations.AlterModelTable(
            name='turnkey_sysevent_log',
            table='TURNKEY_SYSEVENT_LOG_V',
        ),
        migrations.AlterModelTable(
            name='turnkey_transport_config',
            table='TURNKEY_TRANSPORT_CONFIG_V',
        ),
        migrations.AlterModelTable(
            name='turnkey_user_profile',
            table='TURNKEY_USER_PROFILE_V',
        ),
    ]