Last active
August 29, 2015 14:11
-
-
Save amatiasq/5358554750a63891811a to your computer and use it in GitHub Desktop.
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
1 """adding display_networktab column to blog | |
2 | |
3 Revision ID: 43dd765b5380 | |
4 Revises: 4b76556140fb | |
5 Create Date: 2014-12-09 17:54:39.803860 | |
6 | |
7 """ | |
8 | |
9 # revision identifiers, used by Alembic. | |
10 revision = '43dd765b5380' | |
11 down_revision = '4b76556140fb' | |
12 | |
13 from alembic import op | |
14 import sqlalchemy as sa | |
15 | |
16 | |
17 def upgrade(): | |
18 ### commands auto generated by Alembic - please adjust! ### | |
19 op.drop_table('tally') | |
20 op.add_column('blog', sa.Column('display_networktab', sa.Boolean(), server_default='true', nullable=False)) | |
21 op.create_foreign_key(None, 'blog', 'club', ['club_id'], ['id']) | |
22 ### end Alembic commands ### | |
23 | |
24 | |
25 def downgrade(): | |
26 ### commands auto generated by Alembic - please adjust! ### | |
27 op.drop_constraint(None, 'blog', type_='foreignkey') | |
28 op.drop_column('blog', 'display_networktab') | |
29 op.create_table('tally', | |
30 sa.Column('n', sa.INTEGER(), autoincrement=False, nullable=False), | |
31 sa.PrimaryKeyConstraint('n', name=u'pk_tally_n') | |
32 ) | |
33 ### end Alembic commands ### |
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
1 """adding display_networktab column to blog | |
2 | |
3 Revision ID: 43dd765b5380 | |
4 Revises: 4b76556140fb | |
5 Create Date: 2014-12-09 17:54:39.803860 | |
6 | |
7 """ | |
8 | |
9 # revision identifiers, used by Alembic. | |
10 revision = '43dd765b5380' | |
11 down_revision = '4b76556140fb' | |
12 | |
13 from alembic import op | |
14 import sqlalchemy as sa | |
15 | |
16 | |
17 def upgrade(): | |
18 ### commands auto generated by Alembic - please adjust! ### | |
19 op.add_column('blog', sa.Column('display_networktab', sa.Boolean(), server_default='true', nullable=False)) | |
20 ### end Alembic commands ### | |
21 | |
22 | |
23 def downgrade(): | |
24 ### commands auto generated by Alembic - please adjust! ### | |
25 op.drop_column('blog', 'display_networktab') | |
26 ### end Alembic commands ### |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment