<reponame>eubr-bigsea/caipirinha
"""empty message

Revision ID: a7d4e728b549
Revises: d<PASSWORD>
Create Date: 2017-08-09 12:31:42.628620

"""
import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
from sqlalchemy.dialects import mysql
from caipirinha.migration_utils import is_sqlite

revision = 'a7d4e728b549'
down_revision = 'd5ce40ba77de'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    bind = op.get_bind()
    if bind.engine.name == 'mysql':
        op.add_column('visualization',
                  sa.Column('data', mysql.LONGTEXT(), nullable=True))
    else:
        op.add_column('visualization',
                  sa.Column('data', sa.Text(), nullable=True))
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    if is_sqlite():
        with op.batch_alter_table('visualization') as batch_op:
            batch_op.drop_column('data')
    else:
        op.drop_column('visualization', 'data')
    # ### end Alembic commands ###

"""empty message

Revision ID: a7d4e728b549
Revises: d<PASSWORD>
Create Date: 2017-08-09 12:31:42.628620

"""
import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
from sqlalchemy.dialects import mysql
from caipirinha.migration_utils import is_sqlite

revision = 'a7d4e728b549'
down_revision = 'd5ce40ba77de'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    bind = op.get_bind()
    if bind.engine.name == 'mysql':
        op.add_column('visualization',
                  sa.Column('data', mysql.LONGTEXT(), nullable=True))
    else:
        op.add_column('visualization',
                  sa.Column('data', sa.Text(), nullable=True))
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    if is_sqlite():
        with op.batch_alter_table('visualization') as batch_op:
            batch_op.drop_column('data')
    else:
        op.drop_column('visualization', 'data')
    # ### end Alembic commands ###
empty message  Revision ID: a7d4e728b549 Revises: d<PASSWORD> Create Date: 2017-08-09 12:31:42.628620 # revision identifiers, used by Alembic. # ### commands auto generated by Alembic - please adjust! ### # ### end Alembic commands ### # ### commands auto generated by Alembic - please adjust! ### # ### end Alembic commands ###