Blame alembic/versions/588eabcd394c_add_quick_replies_field_to_project.py
|
Lubomír Sedlář |
fc06fa |
"""add quick_replies field to project
|
|
Lubomír Sedlář |
fc06fa |
|
|
Lubomír Sedlář |
fc06fa |
Revision ID: 588eabcd394c
|
|
Lubomír Sedlář |
fc06fa |
Revises: 5083efccac7
|
|
Lubomír Sedlář |
fc06fa |
Create Date: 2016-11-17 16:12:36.624079
|
|
Lubomír Sedlář |
fc06fa |
|
|
Lubomír Sedlář |
fc06fa |
"""
|
|
Lubomír Sedlář |
fc06fa |
|
|
Lubomír Sedlář |
fc06fa |
# revision identifiers, used by Alembic.
|
|
Lubomír Sedlář |
fc06fa |
revision = '588eabcd394c'
|
|
Lubomír Sedlář |
fc06fa |
down_revision = '349a3890596'
|
|
Lubomír Sedlář |
fc06fa |
|
|
Lubomír Sedlář |
fc06fa |
from alembic import op
|
|
Lubomír Sedlář |
fc06fa |
import sqlalchemy as sa
|
|
Lubomír Sedlář |
fc06fa |
|
|
Lubomír Sedlář |
fc06fa |
|
|
Lubomír Sedlář |
fc06fa |
def upgrade():
|
|
Lubomír Sedlář |
fc06fa |
''' Add the column _quick_replies to the table projects
|
|
Lubomír Sedlář |
fc06fa |
'''
|
|
Lubomír Sedlář |
fc06fa |
op.add_column(
|
|
Lubomír Sedlář |
fc06fa |
'projects',
|
|
Lubomír Sedlář |
fc06fa |
sa.Column('_quick_replies', sa.Text, nullable=True)
|
|
Lubomír Sedlář |
fc06fa |
)
|
|
Lubomír Sedlář |
fc06fa |
|
|
Lubomír Sedlář |
fc06fa |
|
|
Lubomír Sedlář |
fc06fa |
def downgrade():
|
|
Lubomír Sedlář |
fc06fa |
''' Drop the column _quick_replies from the table projects.
|
|
Lubomír Sedlář |
fc06fa |
'''
|
|
Lubomír Sedlář |
fc06fa |
op.drop_column('projects', '_quick_replies')
|