"""seo table

Revision ID: 2263218a4ee
Revises: 473f91b5874
Create Date: 2016-01-23 14:15:46.110949

"""

# revision identifiers, used by Alembic.
revision = '2263218a4ee'
down_revision = '473f91b5874'

from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql

def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_table('seo',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('created', sa.DateTime(), nullable=True),
    sa.Column('modified', sa.DateTime(), nullable=True),
    sa.Column('nl_title', sa.Text(), nullable=True),
    sa.Column('en_title', sa.Text(), nullable=True),
    sa.Column('nl_description', sa.Text(), nullable=True),
    sa.Column('en_description', sa.Text(), nullable=True),
    sa.Column('nl_tags', sa.Text(), nullable=True),
    sa.Column('en_tags', sa.Text(), nullable=True),
    sa.Column('page_id', sa.Integer(), nullable=True),
    sa.Column('activity_id', sa.Integer(), nullable=True),
    sa.Column('url', sa.Text(), nullable=True),
    sa.ForeignKeyConstraint(['activity_id'], ['activity.id'], name=op.f('fk_seo_activity_id_activity')),
    sa.ForeignKeyConstraint(['page_id'], ['page.id'], name=op.f('fk_seo_page_id_page')),
    sa.PrimaryKeyConstraint('id', name=op.f('pk_seo')),
    sqlite_autoincrement=True
    )
    op.alter_column('custom_form', 'price',
               existing_type=mysql.FLOAT(),
               nullable=True,
               existing_server_default=sa.text("'0'"))
    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('custom_form', 'price',
               existing_type=mysql.FLOAT(),
               nullable=False,
               existing_server_default=sa.text("'0'"))
    op.drop_table('seo')
    ### end Alembic commands ###
