Blame alembic/versions/43df5e588a87_add_closed_at_attribute_in_issues.py
|
Vivek Anand |
1c6b97 |
"""add_closed_at_attribute_in_issues
|
|
Vivek Anand |
0f4fed |
|
|
Vivek Anand |
1c6b97 |
Revision ID: 43df5e588a87
|
|
Vivek Anand |
1c6b97 |
Revises: 22db0a833d35
|
|
Vivek Anand |
1c6b97 |
Create Date: 2016-06-28 22:59:36.653905
|
|
Vivek Anand |
0f4fed |
|
|
Vivek Anand |
0f4fed |
"""
|
|
Vivek Anand |
0f4fed |
|
|
Vivek Anand |
0f4fed |
# revision identifiers, used by Alembic.
|
|
Vivek Anand |
1c6b97 |
revision = '43df5e588a87'
|
|
Vivek Anand |
1c6b97 |
down_revision = '22db0a833d35'
|
|
Vivek Anand |
0f4fed |
|
|
Vivek Anand |
0f4fed |
from alembic import op
|
|
Vivek Anand |
0f4fed |
import sqlalchemy as sa
|
|
Vivek Anand |
0f4fed |
|
|
Vivek Anand |
1c6b97 |
|
|
Vivek Anand |
0f4fed |
def upgrade():
|
|
Vivek Anand |
0f4fed |
''' Add closed_at column in issues table '''
|
|
Vivek Anand |
0f4fed |
op.add_column(
|
|
Vivek Anand |
0f4fed |
'issues',
|
|
Vivek Anand |
0f4fed |
sa.Column('closed_at', sa.DateTime, nullable=True)
|
|
Vivek Anand |
0f4fed |
)
|
|
Vivek Anand |
0f4fed |
|
|
Vivek Anand |
0f4fed |
|
|
Vivek Anand |
0f4fed |
def downgrade():
|
|
Vivek Anand |
0f4fed |
''' Remove the closed_at column in issues table '''
|
|
Vivek Anand |
0f4fed |
op.drop_column('issues', 'closed_at')
|