"""empty message

Revision ID: 2018_04_20_data_src_refactor
Revises: 2018_04_11_add_sandbox_topic
Create Date: 2018-04-20 13:03:32.478880

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
from sqlalchemy.dialects.postgresql import ARRAY

revision = '2018_04_20_data_src_refactor'
down_revision = '2018_04_11_add_sandbox_topic'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###

    type_of_data_types = sa.Enum('ADMINISTRATIVE', 'SURVEY', name='type_of_data_types')
    op.add_column('page', sa.Column('secondary_source_1_type_of_data', ARRAY(type_of_data_types), nullable=True))
    op.add_column('page', sa.Column('suppression_and_disclosure', sa.TEXT(), nullable=True))
    op.add_column('page', sa.Column('note_on_corrections_or_updates', sa.TEXT(), nullable=True))
    op.add_column('page', sa.Column('secondary_source_1_note_on_corrections_or_updates', sa.TEXT(), nullable=True))
    op.add_column('page', sa.Column('secondary_source_1_data_source_purpose', sa.TEXT(), nullable=True))

    op.get_bind()

    op.execute('''
        UPDATE page SET suppression_and_disclosure = suppression_rules 
        WHERE disclosure_control is null;
    ''')

    op.execute('''
           UPDATE page SET suppression_and_disclosure = disclosure_control 
           WHERE suppression_rules is null;
       ''')

    op.execute('''
        UPDATE page SET suppression_and_disclosure = trim(suppression_rules  || '  ' ||  disclosure_control)
        WHERE suppression_rules is not null
        AND  disclosure_control is not null;
    ''')

    op.drop_constraint('organisation_secondary_source_2_fkey', 'page', type_='foreignkey')
    op.drop_constraint('frequency_secondary_source_2_fkey', 'page', type_='foreignkey')
    op.drop_constraint('secondary_source_2_type_of_statistic_fkey', 'page', type_='foreignkey')
    op.drop_column('page', 'secondary_source_1_date_next_update')
    op.drop_column('page', 'secondary_source_1_date_updated')
    op.drop_column('page', 'secondary_source_1_suppression_rules')
    op.drop_column('page', 'secondary_source_1_disclosure_control')
    op.drop_column('page', 'secondary_source_2_frequency')
    op.drop_column('page', 'secondary_source_2_contact_2_name')
    op.drop_column('page', 'secondary_source_2_contact_2_phone')
    op.drop_column('page', 'secondary_source_2_url')
    op.drop_column('page', 'secondary_source_2_date_next_update')
    op.drop_column('page', 'secondary_source_2_contact_1_name')
    op.drop_column('page', 'last_update_date')
    op.drop_column('page', 'secondary_source_2_contact_1_phone')
    op.drop_column('page', 'secondary_source_2_publisher_text')
    op.drop_column('page', 'secondary_source_2_disclosure_control')
    op.drop_column('page', 'secondary_source_2_type_of_statistic_id')
    op.drop_column('page', 'secondary_source_2_suppression_rules')
    op.drop_column('page', 'secondary_source_2_frequency_other')
    op.drop_column('page', 'secondary_source_2_publisher_id')
    op.drop_column('page', 'secondary_source_2_title')
    op.drop_column('page', 'secondary_source_2_date')
    op.drop_column('page', 'next_update_date')
    op.drop_column('page', 'secondary_source_2_date_updated')
    op.drop_column('page', 'secondary_source_2_statistic_type')
    op.drop_column('page', 'secondary_source_2_frequency_id')
    op.drop_column('page', 'secondary_source_2_contact_2_email')
    op.drop_column('page', 'secondary_source_2_contact_1_email')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('page', sa.Column('secondary_source_2_contact_1_email', sa.TEXT(), autoincrement=False, nullable=True))
    op.add_column('page', sa.Column('secondary_source_2_contact_2_email', sa.TEXT(), autoincrement=False, nullable=True))
    op.add_column('page', sa.Column('secondary_source_2_frequency_id', sa.INTEGER(), autoincrement=False, nullable=True))
    op.add_column('page', sa.Column('secondary_source_2_statistic_type', sa.TEXT(), autoincrement=False, nullable=True))
    op.add_column('page', sa.Column('secondary_source_2_date_updated', sa.TEXT(), autoincrement=False, nullable=True))
    op.add_column('page', sa.Column('secondary_source_2_date', sa.TEXT(), autoincrement=False, nullable=True))
    op.add_column('page', sa.Column('secondary_source_2_title', sa.TEXT(), autoincrement=False, nullable=True))
    op.add_column('page', sa.Column('secondary_source_2_publisher_id', sa.VARCHAR(length=255), autoincrement=False, nullable=True))
    op.add_column('page', sa.Column('secondary_source_2_frequency_other', sa.VARCHAR(length=255), autoincrement=False, nullable=True))
    op.add_column('page', sa.Column('secondary_source_2_suppression_rules', sa.TEXT(), autoincrement=False, nullable=True))
    op.add_column('page', sa.Column('secondary_source_2_type_of_statistic_id', sa.INTEGER(), autoincrement=False, nullable=True))
    op.add_column('page', sa.Column('secondary_source_2_disclosure_control', sa.TEXT(), autoincrement=False, nullable=True))
    op.add_column('page', sa.Column('secondary_source_2_publisher_text', sa.TEXT(), autoincrement=False, nullable=True))
    op.add_column('page', sa.Column('secondary_source_2_contact_1_phone', sa.TEXT(), autoincrement=False, nullable=True))
    op.add_column('page', sa.Column('secondary_source_2_contact_1_name', sa.TEXT(), autoincrement=False, nullable=True))
    op.add_column('page', sa.Column('secondary_source_2_date_next_update', sa.TEXT(), autoincrement=False, nullable=True))
    op.add_column('page', sa.Column('secondary_source_2_url', sa.TEXT(), autoincrement=False, nullable=True))
    op.add_column('page', sa.Column('secondary_source_2_contact_2_phone', sa.TEXT(), autoincrement=False, nullable=True))
    op.add_column('page', sa.Column('secondary_source_2_contact_2_name', sa.TEXT(), autoincrement=False, nullable=True))
    op.add_column('page', sa.Column('secondary_source_2_frequency', sa.TEXT(), autoincrement=False, nullable=True))
    op.add_column('page', sa.Column('last_update_date', sa.VARCHAR(length=255), autoincrement=False, nullable=True))
    op.add_column('page', sa.Column('next_update_date', sa.VARCHAR(length=255), autoincrement=False, nullable=True))
    op.add_column('page', sa.Column('secondary_source_1_date_next_update', sa.TEXT(), autoincrement=False, nullable=True))
    op.add_column('page', sa.Column('secondary_source_1_date_updated', sa.TEXT(), autoincrement=False, nullable=True))
    op.add_column('page', sa.Column('secondary_source_1_disclosure_control', sa.TEXT(), autoincrement=False, nullable=True))
    op.add_column('page', sa.Column('secondary_source_1_suppression_rules', sa.TEXT(), autoincrement=False, nullable=True))

    op.create_foreign_key('secondary_source_2_type_of_statistic_fkey', 'page', 'type_of_statistic', ['secondary_source_2_type_of_statistic_id'], ['id'])
    op.create_foreign_key('frequency_secondary_source_2_fkey', 'page', 'frequency_of_release', ['secondary_source_2_frequency_id'], ['id'])
    op.create_foreign_key('organisation_secondary_source_2_fkey', 'page', 'organisation', ['secondary_source_2_publisher_id'], ['id'])

    op.drop_column('page', 'secondary_source_1_type_of_data')
    op.drop_column('page', 'suppression_and_disclosure')
    op.drop_column('page', 'note_on_corrections_or_updates')
    op.drop_column('page', 'secondary_source_1_note_on_corrections_or_updates')
    op.drop_column('page', 'secondary_source_1_data_source_purpose')

    # ### end Alembic commands ###

[((520, 582), 'sqlalchemy.Enum', 'sa.Enum', (['"""ADMINISTRATIVE"""', '"""SURVEY"""'], {'name': '"""type_of_data_types"""'}), "('ADMINISTRATIVE', 'SURVEY', name='type_of_data_types')\n", (527, 582), True, 'import sqlalchemy as sa\n'), ((1113, 1126), 'alembic.op.get_bind', 'op.get_bind', ([], {}), '()\n', (1124, 1126), False, 'from alembic import op\n'), ((1132, 1279), 'alembic.op.execute', 'op.execute', (['"""\n        UPDATE page SET suppression_and_disclosure = suppression_rules \n        WHERE disclosure_control is null;\n    """'], {}), '(\n    """\n        UPDATE page SET suppression_and_disclosure = suppression_rules \n        WHERE disclosure_control is null;\n    """\n    )\n', (1142, 1279), False, 'from alembic import op\n'), ((1275, 1431), 'alembic.op.execute', 'op.execute', (['"""\n           UPDATE page SET suppression_and_disclosure = disclosure_control \n           WHERE suppression_rules is null;\n       """'], {}), '(\n    """\n           UPDATE page SET suppression_and_disclosure = disclosure_control \n           WHERE suppression_rules is null;\n       """\n    )\n', (1285, 1431), False, 'from alembic import op\n'), ((1427, 1658), 'alembic.op.execute', 'op.execute', (['"""\n        UPDATE page SET suppression_and_disclosure = trim(suppression_rules  || \'  \' ||  disclosure_control)\n        WHERE suppression_rules is not null\n        AND  disclosure_control is not null;\n    """'], {}), '(\n    """\n        UPDATE page SET suppression_and_disclosure = trim(suppression_rules  || \'  \' ||  disclosure_control)\n        WHERE suppression_rules is not null\n        AND  disclosure_control is not null;\n    """\n    )\n', (1437, 1658), False, 'from alembic import op\n'), ((1654, 1745), 'alembic.op.drop_constraint', 'op.drop_constraint', (['"""organisation_secondary_source_2_fkey"""', '"""page"""'], {'type_': '"""foreignkey"""'}), "('organisation_secondary_source_2_fkey', 'page', type_=\n    'foreignkey')\n", (1672, 1745), False, 'from alembic import op\n'), ((1745, 1833), 'alembic.op.drop_constraint', 'op.drop_constraint', (['"""frequency_secondary_source_2_fkey"""', '"""page"""'], {'type_': '"""foreignkey"""'}), "('frequency_secondary_source_2_fkey', 'page', type_=\n    'foreignkey')\n", (1763, 1833), False, 'from alembic import op\n'), ((1833, 1928), 'alembic.op.drop_constraint', 'op.drop_constraint', (['"""secondary_source_2_type_of_statistic_fkey"""', '"""page"""'], {'type_': '"""foreignkey"""'}), "('secondary_source_2_type_of_statistic_fkey', 'page',\n    type_='foreignkey')\n", (1851, 1928), False, 'from alembic import op\n'), ((1929, 1990), 'alembic.op.drop_column', 'op.drop_column', (['"""page"""', '"""secondary_source_1_date_next_update"""'], {}), "('page', 'secondary_source_1_date_next_update')\n", (1943, 1990), False, 'from alembic import op\n'), ((1995, 2052), 'alembic.op.drop_column', 'op.drop_column', (['"""page"""', '"""secondary_source_1_date_updated"""'], {}), "('page', 'secondary_source_1_date_updated')\n", (2009, 2052), False, 'from alembic import op\n'), ((2057, 2119), 'alembic.op.drop_column', 'op.drop_column', (['"""page"""', '"""secondary_source_1_suppression_rules"""'], {}), "('page', 'secondary_source_1_suppression_rules')\n", (2071, 2119), False, 'from alembic import op\n'), ((2124, 2187), 'alembic.op.drop_column', 'op.drop_column', (['"""page"""', '"""secondary_source_1_disclosure_control"""'], {}), "('page', 'secondary_source_1_disclosure_control')\n", (2138, 2187), False, 'from alembic import op\n'), ((2192, 2246), 'alembic.op.drop_column', 'op.drop_column', (['"""page"""', '"""secondary_source_2_frequency"""'], {}), "('page', 'secondary_source_2_frequency')\n", (2206, 2246), False, 'from alembic import op\n'), ((2251, 2310), 'alembic.op.drop_column', 'op.drop_column', (['"""page"""', '"""secondary_source_2_contact_2_name"""'], {}), "('page', 'secondary_source_2_contact_2_name')\n", (2265, 2310), False, 'from alembic import op\n'), ((2315, 2375), 'alembic.op.drop_column', 'op.drop_column', (['"""page"""', '"""secondary_source_2_contact_2_phone"""'], {}), "('page', 'secondary_source_2_contact_2_phone')\n", (2329, 2375), False, 'from alembic import op\n'), ((2380, 2428), 'alembic.op.drop_column', 'op.drop_column', (['"""page"""', '"""secondary_source_2_url"""'], {}), "('page', 'secondary_source_2_url')\n", (2394, 2428), False, 'from alembic import op\n'), ((2433, 2494), 'alembic.op.drop_column', 'op.drop_column', (['"""page"""', '"""secondary_source_2_date_next_update"""'], {}), "('page', 'secondary_source_2_date_next_update')\n", (2447, 2494), False, 'from alembic import op\n'), ((2499, 2558), 'alembic.op.drop_column', 'op.drop_column', (['"""page"""', '"""secondary_source_2_contact_1_name"""'], {}), "('page', 'secondary_source_2_contact_1_name')\n", (2513, 2558), False, 'from alembic import op\n'), ((2563, 2605), 'alembic.op.drop_column', 'op.drop_column', (['"""page"""', '"""last_update_date"""'], {}), "('page', 'last_update_date')\n", (2577, 2605), False, 'from alembic import op\n'), ((2610, 2670), 'alembic.op.drop_column', 'op.drop_column', (['"""page"""', '"""secondary_source_2_contact_1_phone"""'], {}), "('page', 'secondary_source_2_contact_1_phone')\n", (2624, 2670), False, 'from alembic import op\n'), ((2675, 2734), 'alembic.op.drop_column', 'op.drop_column', (['"""page"""', '"""secondary_source_2_publisher_text"""'], {}), "('page', 'secondary_source_2_publisher_text')\n", (2689, 2734), False, 'from alembic import op\n'), ((2739, 2802), 'alembic.op.drop_column', 'op.drop_column', (['"""page"""', '"""secondary_source_2_disclosure_control"""'], {}), "('page', 'secondary_source_2_disclosure_control')\n", (2753, 2802), False, 'from alembic import op\n'), ((2807, 2872), 'alembic.op.drop_column', 'op.drop_column', (['"""page"""', '"""secondary_source_2_type_of_statistic_id"""'], {}), "('page', 'secondary_source_2_type_of_statistic_id')\n", (2821, 2872), False, 'from alembic import op\n'), ((2877, 2939), 'alembic.op.drop_column', 'op.drop_column', (['"""page"""', '"""secondary_source_2_suppression_rules"""'], {}), "('page', 'secondary_source_2_suppression_rules')\n", (2891, 2939), False, 'from alembic import op\n'), ((2944, 3004), 'alembic.op.drop_column', 'op.drop_column', (['"""page"""', '"""secondary_source_2_frequency_other"""'], {}), "('page', 'secondary_source_2_frequency_other')\n", (2958, 3004), False, 'from alembic import op\n'), ((3009, 3066), 'alembic.op.drop_column', 'op.drop_column', (['"""page"""', '"""secondary_source_2_publisher_id"""'], {}), "('page', 'secondary_source_2_publisher_id')\n", (3023, 3066), False, 'from alembic import op\n'), ((3071, 3121), 'alembic.op.drop_column', 'op.drop_column', (['"""page"""', '"""secondary_source_2_title"""'], {}), "('page', 'secondary_source_2_title')\n", (3085, 3121), False, 'from alembic import op\n'), ((3126, 3175), 'alembic.op.drop_column', 'op.drop_column', (['"""page"""', '"""secondary_source_2_date"""'], {}), "('page', 'secondary_source_2_date')\n", (3140, 3175), False, 'from alembic import op\n'), ((3180, 3222), 'alembic.op.drop_column', 'op.drop_column', (['"""page"""', '"""next_update_date"""'], {}), "('page', 'next_update_date')\n", (3194, 3222), False, 'from alembic import op\n'), ((3227, 3284), 'alembic.op.drop_column', 'op.drop_column', (['"""page"""', '"""secondary_source_2_date_updated"""'], {}), "('page', 'secondary_source_2_date_updated')\n", (3241, 3284), False, 'from alembic import op\n'), ((3289, 3348), 'alembic.op.drop_column', 'op.drop_column', (['"""page"""', '"""secondary_source_2_statistic_type"""'], {}), "('page', 'secondary_source_2_statistic_type')\n", (3303, 3348), False, 'from alembic import op\n'), ((3353, 3410), 'alembic.op.drop_column', 'op.drop_column', (['"""page"""', '"""secondary_source_2_frequency_id"""'], {}), "('page', 'secondary_source_2_frequency_id')\n", (3367, 3410), False, 'from alembic import op\n'), ((3415, 3475), 'alembic.op.drop_column', 'op.drop_column', (['"""page"""', '"""secondary_source_2_contact_2_email"""'], {}), "('page', 'secondary_source_2_contact_2_email')\n", (3429, 3475), False, 'from alembic import op\n'), ((3480, 3540), 'alembic.op.drop_column', 'op.drop_column', (['"""page"""', '"""secondary_source_2_contact_1_email"""'], {}), "('page', 'secondary_source_2_contact_1_email')\n", (3494, 3540), False, 'from alembic import op\n'), ((6822, 6974), 'alembic.op.create_foreign_key', 'op.create_foreign_key', (['"""secondary_source_2_type_of_statistic_fkey"""', '"""page"""', '"""type_of_statistic"""', "['secondary_source_2_type_of_statistic_id']", "['id']"], {}), "('secondary_source_2_type_of_statistic_fkey', 'page',\n    'type_of_statistic', ['secondary_source_2_type_of_statistic_id'], ['id'])\n", (6843, 6974), False, 'from alembic import op\n'), ((6975, 7114), 'alembic.op.create_foreign_key', 'op.create_foreign_key', (['"""frequency_secondary_source_2_fkey"""', '"""page"""', '"""frequency_of_release"""', "['secondary_source_2_frequency_id']", "['id']"], {}), "('frequency_secondary_source_2_fkey', 'page',\n    'frequency_of_release', ['secondary_source_2_frequency_id'], ['id'])\n", (6996, 7114), False, 'from alembic import op\n'), ((7115, 7249), 'alembic.op.create_foreign_key', 'op.create_foreign_key', (['"""organisation_secondary_source_2_fkey"""', '"""page"""', '"""organisation"""', "['secondary_source_2_publisher_id']", "['id']"], {}), "('organisation_secondary_source_2_fkey', 'page',\n    'organisation', ['secondary_source_2_publisher_id'], ['id'])\n", (7136, 7249), False, 'from alembic import op\n'), ((7251, 7308), 'alembic.op.drop_column', 'op.drop_column', (['"""page"""', '"""secondary_source_1_type_of_data"""'], {}), "('page', 'secondary_source_1_type_of_data')\n", (7265, 7308), False, 'from alembic import op\n'), ((7313, 7365), 'alembic.op.drop_column', 'op.drop_column', (['"""page"""', '"""suppression_and_disclosure"""'], {}), "('page', 'suppression_and_disclosure')\n", (7327, 7365), False, 'from alembic import op\n'), ((7370, 7426), 'alembic.op.drop_column', 'op.drop_column', (['"""page"""', '"""note_on_corrections_or_updates"""'], {}), "('page', 'note_on_corrections_or_updates')\n", (7384, 7426), False, 'from alembic import op\n'), ((7431, 7506), 'alembic.op.drop_column', 'op.drop_column', (['"""page"""', '"""secondary_source_1_note_on_corrections_or_updates"""'], {}), "('page', 'secondary_source_1_note_on_corrections_or_updates')\n", (7445, 7506), False, 'from alembic import op\n'), ((7511, 7575), 'alembic.op.drop_column', 'op.drop_column', (['"""page"""', '"""secondary_source_1_data_source_purpose"""'], {}), "('page', 'secondary_source_1_data_source_purpose')\n", (7525, 7575), False, 'from alembic import op\n'), ((654, 679), 'sqlalchemy.dialects.postgresql.ARRAY', 'ARRAY', (['type_of_data_types'], {}), '(type_of_data_types)\n', (659, 679), False, 'from sqlalchemy.dialects.postgresql import ARRAY\n'), ((763, 772), 'sqlalchemy.TEXT', 'sa.TEXT', ([], {}), '()\n', (770, 772), True, 'import sqlalchemy as sa\n'), ((860, 869), 'sqlalchemy.TEXT', 'sa.TEXT', ([], {}), '()\n', (867, 869), True, 'import sqlalchemy as sa\n'), ((976, 985), 'sqlalchemy.TEXT', 'sa.TEXT', ([], {}), '()\n', (983, 985), True, 'import sqlalchemy as sa\n'), ((1081, 1090), 'sqlalchemy.TEXT', 'sa.TEXT', ([], {}), '()\n', (1088, 1090), True, 'import sqlalchemy as sa\n'), ((3735, 3744), 'sqlalchemy.TEXT', 'sa.TEXT', ([], {}), '()\n', (3742, 3744), True, 'import sqlalchemy as sa\n'), ((3857, 3866), 'sqlalchemy.TEXT', 'sa.TEXT', ([], {}), '()\n', (3864, 3866), True, 'import sqlalchemy as sa\n'), ((3976, 3988), 'sqlalchemy.INTEGER', 'sa.INTEGER', ([], {}), '()\n', (3986, 3988), True, 'import sqlalchemy as sa\n'), ((4100, 4109), 'sqlalchemy.TEXT', 'sa.TEXT', ([], {}), '()\n', (4107, 4109), True, 'import sqlalchemy as sa\n'), ((4219, 4228), 'sqlalchemy.TEXT', 'sa.TEXT', ([], {}), '()\n', (4226, 4228), True, 'import sqlalchemy as sa\n'), ((4330, 4339), 'sqlalchemy.TEXT', 'sa.TEXT', ([], {}), '()\n', (4337, 4339), True, 'import sqlalchemy as sa\n'), ((4442, 4451), 'sqlalchemy.TEXT', 'sa.TEXT', ([], {}), '()\n', (4449, 4451), True, 'import sqlalchemy as sa\n'), ((4561, 4583), 'sqlalchemy.VARCHAR', 'sa.VARCHAR', ([], {'length': '(255)'}), '(length=255)\n', (4571, 4583), True, 'import sqlalchemy as sa\n'), ((4696, 4718), 'sqlalchemy.VARCHAR', 'sa.VARCHAR', ([], {'length': '(255)'}), '(length=255)\n', (4706, 4718), True, 'import sqlalchemy as sa\n'), ((4833, 4842), 'sqlalchemy.TEXT', 'sa.TEXT', ([], {}), '()\n', (4840, 4842), True, 'import sqlalchemy as sa\n'), ((4960, 4972), 'sqlalchemy.INTEGER', 'sa.INTEGER', ([], {}), '()\n', (4970, 4972), True, 'import sqlalchemy as sa\n'), ((5088, 5097), 'sqlalchemy.TEXT', 'sa.TEXT', ([], {}), '()\n', (5095, 5097), True, 'import sqlalchemy as sa\n'), ((5209, 5218), 'sqlalchemy.TEXT', 'sa.TEXT', ([], {}), '()\n', (5216, 5218), True, 'import sqlalchemy as sa\n'), ((5331, 5340), 'sqlalchemy.TEXT', 'sa.TEXT', ([], {}), '()\n', (5338, 5340), True, 'import sqlalchemy as sa\n'), ((5452, 5461), 'sqlalchemy.TEXT', 'sa.TEXT', ([], {}), '()\n', (5459, 5461), True, 'import sqlalchemy as sa\n'), ((5575, 5584), 'sqlalchemy.TEXT', 'sa.TEXT', ([], {}), '()\n', (5582, 5584), True, 'import sqlalchemy as sa\n'), ((5685, 5694), 'sqlalchemy.TEXT', 'sa.TEXT', ([], {}), '()\n', (5692, 5694), True, 'import sqlalchemy as sa\n'), ((5807, 5816), 'sqlalchemy.TEXT', 'sa.TEXT', ([], {}), '()\n', (5814, 5816), True, 'import sqlalchemy as sa\n'), ((5928, 5937), 'sqlalchemy.TEXT', 'sa.TEXT', ([], {}), '()\n', (5935, 5937), True, 'import sqlalchemy as sa\n'), ((6044, 6053), 'sqlalchemy.TEXT', 'sa.TEXT', ([], {}), '()\n', (6051, 6053), True, 'import sqlalchemy as sa\n'), ((6148, 6170), 'sqlalchemy.VARCHAR', 'sa.VARCHAR', ([], {'length': '(255)'}), '(length=255)\n', (6158, 6170), True, 'import sqlalchemy as sa\n'), ((6265, 6287), 'sqlalchemy.VARCHAR', 'sa.VARCHAR', ([], {'length': '(255)'}), '(length=255)\n', (6275, 6287), True, 'import sqlalchemy as sa\n'), ((6401, 6410), 'sqlalchemy.TEXT', 'sa.TEXT', ([], {}), '()\n', (6408, 6410), True, 'import sqlalchemy as sa\n'), ((6520, 6529), 'sqlalchemy.TEXT', 'sa.TEXT', ([], {}), '()\n', (6527, 6529), True, 'import sqlalchemy as sa\n'), ((6645, 6654), 'sqlalchemy.TEXT', 'sa.TEXT', ([], {}), '()\n', (6652, 6654), True, 'import sqlalchemy as sa\n'), ((6769, 6778), 'sqlalchemy.TEXT', 'sa.TEXT', ([], {}), '()\n', (6776, 6778), True, 'import sqlalchemy as sa\n')]