This repository has been archived by the owner on Feb 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add database revision which adds
stores_managers
table
- Loading branch information
Matt Wright
committed
Jun 29, 2013
1 parent
7330a85
commit 5496ccf
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ### |