Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

Commit

Permalink
Add database revision which adds stores_managers table
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Wright committed Jun 29, 2013
1 parent 7330a85 commit 5496ccf
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions alembic/versions/4fe474604dbb_add_stores_managers_.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
"""Add `stores_managers` table
Revision ID: 4fe474604dbb
Revises: 5a0e003fafb2
Create Date: 2013-06-28 22:18:42.292040
"""

# revision identifiers, used by Alembic.
revision = '4fe474604dbb'
down_revision = '5a0e003fafb2'

from alembic import op
import sqlalchemy as sa


def upgrade():
### commands auto generated by Alembic - please adjust! ###
op.create_table('stores_managers',
sa.Column('user_id', sa.Integer(), nullable=True),
sa.Column('store_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['store_id'], ['stores.id'], ),
sa.ForeignKeyConstraint(['user_id'], ['users.id'], ),
sa.PrimaryKeyConstraint()
)
### end Alembic commands ###


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

0 comments on commit 5496ccf

Please sign in to comment.