"""Add translated_strings

Revision ID: 0ab02337f372
Revises:
Create Date: 2017-03-08 14:50:37.058424

"""

# revision identifiers, used by Alembic.
revision = '0ab02337f372'
down_revision = None
branch_labels = None
depends_on = None

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

def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.execute('CREATE EXTENSION IF NOT EXISTS "uuid-ossp";')
    op.create_table('translated_string',
    sa.Column('id', postgresql.UUID(as_uuid=True), server_default=sa.text('uuid_generate_v4()'), nullable=False),
    sa.Column('base_string', sa.Text(), nullable=True),
    sa.Column('translation', sa.Text(), nullable=True),
    sa.Column('comment', sa.Text(), nullable=True),
    sa.Column('translator_comment', sa.Text(), nullable=True),
    sa.Column('context', sa.Text(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('translated_string')
    # ### end Alembic commands ###
