fossasia/open-event-orga-server

View on GitHub
migrations/versions/a9b15f3c5424_.py

Summary

Maintainability
A
30 mins
Test Coverage
"""empty message

Revision ID: a9b15f3c5424
Revises: afa76758760e
Create Date: 2017-01-22 15:14:22.676364

"""

# revision identifiers, used by Alembic.
revision = 'a9b15f3c5424'
down_revision = 'afa76758760e'

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

def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('access_codes', 'type')
    op.drop_column('access_codes', 'value')
    op.add_column('settings', sa.Column('app_environment', sa.String(), nullable=True))
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('settings', 'app_environment')
    op.add_column('access_codes', sa.Column('value', postgresql.DOUBLE_PRECISION(precision=53), autoincrement=False, nullable=True))
    op.add_column('access_codes', sa.Column('type', sa.VARCHAR(), autoincrement=False, nullable=True))
    # ### end Alembic commands ###