fossasia/open-event-orga-server

View on GitHub
migrations/versions/5aea50727992_.py

Summary

Maintainability
A
1 hr
Test Coverage
"""empty message

Revision ID: 5aea50727992
Revises: 0e648fcb8ef6
Create Date: 2016-06-20 11:16:36.869000

"""

# revision identifiers, used by Alembic.
revision = '5aea50727992'
down_revision = '0e648fcb8ef6'

from alembic import op
import sqlalchemy as sa
import sqlalchemy_utils


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('sessions_speakers')
    op.add_column('user', sa.Column('created_date', sa.DateTime(), nullable=True))
    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('user', 'created_date')
    op.create_table('sessions_speakers',
    sa.Column('id', sa.INTEGER(), nullable=False),
    sa.Column('speaker_id', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.Column('session_id', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.ForeignKeyConstraint(['session_id'], [u'session.id'], name=u'sessions_speakers_session_id_fkey'),
    sa.ForeignKeyConstraint(['speaker_id'], [u'speaker.id'], name=u'sessions_speakers_speaker_id_fkey'),
    sa.PrimaryKeyConstraint('id', name=u'sessions_speakers_pkey')
    )
    ### end Alembic commands ###