fossasia/open-event-orga-server

View on GitHub
migrations/versions/rev-2023-07-19-18:29:35-9881f067213b_.py

Summary

Maintainability
C
1 day
Test Coverage
"""empty message

Revision ID: 9881f067213b
Revises: 3b784f9c98c7
Create Date: 2023-07-18 18:29:35.835886

"""

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '9881f067213b'
down_revision = '3b784f9c98c7'


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('station',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('station_name', sa.String(), nullable=False),
    sa.Column('station_type', sa.String(), nullable=True),
    sa.Column('microlocation_id', sa.Integer(), nullable=True),
    sa.Column('event_id', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['event_id'], ['events.id'], ondelete='CASCADE'),
    sa.ForeignKeyConstraint(['microlocation_id'], ['microlocations.id'], ondelete='CASCADE'),
    sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###


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