Skip to content

Commit 0e6f532

Browse files
author
App Generator
committed
Phase 4 (Migration) - Generate SQL for new column
- Migration file generated by `flask db migrate`
1 parent 20e6164 commit 0e6f532

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
"""Stats - Added Total_Sales Column
2+
3+
Revision ID: d26f9f5f6e4f
4+
Revises:
5+
Create Date: 2021-04-05 19:37:26.018820
6+
7+
"""
8+
from alembic import op
9+
import sqlalchemy as sa
10+
11+
12+
# revision identifiers, used by Alembic.
13+
revision = 'd26f9f5f6e4f'
14+
down_revision = None
15+
branch_labels = None
16+
depends_on = None
17+
18+
19+
def upgrade():
20+
# ### commands auto generated by Alembic - please adjust! ###
21+
op.add_column('stats', sa.Column('total_sales', sa.Integer(), nullable=True))
22+
# ### end Alembic commands ###
23+
24+
25+
def downgrade():
26+
# ### commands auto generated by Alembic - please adjust! ###
27+
op.drop_column('stats', 'total_sales')
28+
# ### end Alembic commands ###

0 commit comments

Comments
 (0)