"""Updated news table for dual languge

Revision ID: 16bc3324d30
Revises: <PASSWORD>
Create Date: 2015-07-19 14:36:04.156686

"""
from alembic import op
import sqlalchemy as sa

# revision identifiers, used by Alembic.
revision = '1<PASSWORD>'
down_revision = '<PASSWORD>'


def upgrade():
    # commands auto generated by Alembic - please adjust! ###
    # Add english columns
    op.add_column('news', sa.Column('en_content', sa.Text(), nullable=True))
    op.add_column('news', sa.Column('en_title', sa.String(length=256),
                                    nullable=True))

    op.alter_column(table_name='news',
                    column_name='content',
                    nullable=True,
                    new_column_name='nl_content',
                    type_=sa.Text(),
                    existing_type=sa.Text()
                    )
    op.alter_column(table_name='news',
                    column_name='title',
                    nullable=True,
                    new_column_name='nl_title',
                    type_=sa.String(length=256),
                    existing_type=sa.Text()
                    )
    # end Alembic commands ###


def downgrade():
    # commands auto generated by Alembic - please adjust! ###
    op.alter_column(table_name='news',
                    column_name='nl_content',
                    nullable=True,
                    new_column_name='content',
                    type_=sa.Text(),
                    existing_type=sa.Text()
                    )
    op.alter_column(table_name='news',
                    column_name='nl_title',
                    nullable=True,
                    new_column_name='title',
                    type_=sa.Text(),
                    existing_type=sa.String(length=256),
                    )

    op.drop_column('news', 'en_title')
    op.drop_column('news', 'en_content')
    # end Alembic commands ###

"""Updated news table for dual languge

Revision ID: 16bc3324d30
Revises: <PASSWORD>
Create Date: 2015-07-19 14:36:04.156686

"""
from alembic import op
import sqlalchemy as sa

# revision identifiers, used by Alembic.
revision = '1<PASSWORD>'
down_revision = '<PASSWORD>'


def upgrade():
    # commands auto generated by Alembic - please adjust! ###
    # Add english columns
    op.add_column('news', sa.Column('en_content', sa.Text(), nullable=True))
    op.add_column('news', sa.Column('en_title', sa.String(length=256),
                                    nullable=True))

    op.alter_column(table_name='news',
                    column_name='content',
                    nullable=True,
                    new_column_name='nl_content',
                    type_=sa.Text(),
                    existing_type=sa.Text()
                    )
    op.alter_column(table_name='news',
                    column_name='title',
                    nullable=True,
                    new_column_name='nl_title',
                    type_=sa.String(length=256),
                    existing_type=sa.Text()
                    )
    # end Alembic commands ###


def downgrade():
    # commands auto generated by Alembic - please adjust! ###
    op.alter_column(table_name='news',
                    column_name='nl_content',
                    nullable=True,
                    new_column_name='content',
                    type_=sa.Text(),
                    existing_type=sa.Text()
                    )
    op.alter_column(table_name='news',
                    column_name='nl_title',
                    nullable=True,
                    new_column_name='title',
                    type_=sa.Text(),
                    existing_type=sa.String(length=256),
                    )

    op.drop_column('news', 'en_title')
    op.drop_column('news', 'en_content')
    # end Alembic commands ###

Updated news table for dual languge  Revision ID: 16bc3324d30 Revises: <PASSWORD> Create Date: 2015-07-19 14:36:04.156686 # revision identifiers, used by Alembic. # commands auto generated by Alembic - please adjust! ### # Add english columns # end Alembic commands ### # commands auto generated by Alembic - please adjust! ### # end Alembic commands ###