Skip to content

Commit 2370460

Browse files
committed
Add migration to remove status column
This is safe to run once the preceding commits are deployed all the way out to production.
1 parent 170d5ac commit 2370460

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
"""Remove status column from user table
2+
3+
Revision ID: 0d4755a0d88b
4+
Revises: 2494fea98d2d
5+
Create Date: 2016-03-21 20:07:07.002482
6+
7+
"""
8+
9+
# revision identifiers, used by Alembic.
10+
revision = '0d4755a0d88b'
11+
down_revision = '2494fea98d2d'
12+
13+
from alembic import op
14+
import sqlalchemy as sa
15+
16+
17+
def upgrade():
18+
# Dropping a column is O(1) so this is safe to run against a production
19+
# database.
20+
op.drop_column('user', 'status')
21+
22+
23+
def downgrade():
24+
op.add_column('user', sa.Column('status', sa.Integer()))

0 commit comments

Comments
 (0)