"""new attributes for csv files

Revision ID: 9dccb02d8201
Revises: <KEY>
Create Date: 2017-06-30 15:30:33.159354

"""
from alembic import op
import sqlalchemy as sa
from limonero.migration_utils import is_sqlite


# revision identifiers, used by Alembic.
revision = '<KEY>'
down_revision = '<KEY>'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('data_source', sa.Column('attribute_delimiter', sa.String(length=4), nullable=True))
    op.add_column('data_source', sa.Column('record_delimiter', sa.String(length=4), nullable=True))
    # ### end Alembic commands ###


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

    if is_sqlite():
        with op.batch_alter_table('data_source') as batch_op:
            batch_op.drop_column('record_delimiter')
            batch_op.drop_column('attribute_delimiter')
    else:
        op.drop_column('data_source', 'record_delimiter')
        op.drop_column('data_source', 'attribute_delimiter')
    # ### end Alembic commands ###

"""new attributes for csv files

Revision ID: 9dccb02d8201
Revises: <KEY>
Create Date: 2017-06-30 15:30:33.159354

"""
from alembic import op
import sqlalchemy as sa
from limonero.migration_utils import is_sqlite


# revision identifiers, used by Alembic.
revision = '<KEY>'
down_revision = '<KEY>'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('data_source', sa.Column('attribute_delimiter', sa.String(length=4), nullable=True))
    op.add_column('data_source', sa.Column('record_delimiter', sa.String(length=4), nullable=True))
    # ### end Alembic commands ###


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

    if is_sqlite():
        with op.batch_alter_table('data_source') as batch_op:
            batch_op.drop_column('record_delimiter')
            batch_op.drop_column('attribute_delimiter')
    else:
        op.drop_column('data_source', 'record_delimiter')
        op.drop_column('data_source', 'attribute_delimiter')
    # ### end Alembic commands ###

new attributes for csv files  Revision ID: 9dccb02d8201 Revises: <KEY> Create Date: 2017-06-30 15:30:33.159354 # 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 ###