Blame alembic/versions/6addaed6008e_add_description_for_tags.py
|
Pradeep CE (cep) |
9a63dd |
"""Add description for tags
|
|
Pradeep CE (cep) |
9a63dd |
|
|
Pradeep CE (cep) |
9a63dd |
Revision ID: 6addaed6008e
|
|
Pradeep CE (cep) |
9a63dd |
Revises: 208b0cd232ab
|
|
Pradeep CE (cep) |
9a63dd |
Create Date: 2017-01-14 23:38:15.631750
|
|
Pradeep CE (cep) |
9a63dd |
|
|
Pradeep CE (cep) |
9a63dd |
"""
|
|
Pradeep CE (cep) |
9a63dd |
|
|
Pradeep CE (cep) |
9a63dd |
# revision identifiers, used by Alembic.
|
|
Pradeep CE (cep) |
9a63dd |
revision = '6addaed6008e'
|
|
Pradeep CE (cep) |
9a63dd |
down_revision = '208b0cd232ab'
|
|
Pradeep CE (cep) |
9a63dd |
|
|
Pradeep CE (cep) |
9a63dd |
from alembic import op
|
|
Pradeep CE (cep) |
9a63dd |
import sqlalchemy as sa
|
|
Pradeep CE (cep) |
9a63dd |
|
|
Pradeep CE (cep) |
9a63dd |
|
|
Pradeep CE (cep) |
9a63dd |
def upgrade():
|
|
Pradeep CE (cep) |
28c476 |
''' Add the column tag_description to the table tags_colored.
|
|
Pradeep CE (cep) |
9a63dd |
'''
|
|
Pradeep CE (cep) |
9a63dd |
op.add_column(
|
|
Pradeep CE (cep) |
9a63dd |
'tags_colored',
|
|
Pradeep CE (cep) |
dc15c9 |
sa.Column('tag_description', sa.String(255), default="")
|
|
Pradeep CE (cep) |
9a63dd |
)
|
|
Pradeep CE (cep) |
9a63dd |
|
|
Pradeep CE (cep) |
9a63dd |
def downgrade():
|
|
Pradeep CE (cep) |
28c476 |
''' Remove column tag_description from the table tags_colored.
|
|
Pradeep CE (cep) |
28c476 |
'''
|
|
Pradeep CE (cep) |
9a63dd |
op.drop_column('tags_colored', 'tag_description')
|