Skip to content

Commit

Permalink
tmp migration
Browse files Browse the repository at this point in the history
  • Loading branch information
jaesivsm committed May 3, 2018
1 parent f5b28be commit 89dc06e
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions migrations/versions/8079a1cb5874_.py
@@ -0,0 +1,35 @@
"""empty message
Revision ID: 8079a1cb5874
Revises: 00c5cc87408d
Create Date: 2018-02-23 15:59:24.702040
"""

# revision identifiers, used by Alembic.
revision = '8079a1cb5874'
down_revision = '00c5cc87408d'
branch_labels = None
depends_on = None

from alembic import op
import sqlalchemy as sa


def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('tag')
op.add_column('article', sa.Column('tags', sa.PickleType(), nullable=True))
# ### end Alembic commands ###


def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('article', 'tags')
op.create_table('tag',
sa.Column('text', sa.VARCHAR(), autoincrement=False, nullable=False),
sa.Column('article_id', sa.INTEGER(), autoincrement=False, nullable=False),
sa.ForeignKeyConstraint(['article_id'], ['article.id'], name='tag_article_id_fkey', ondelete='CASCADE'),
sa.PrimaryKeyConstraint('text', 'article_id', name='tag_pkey')
)
# ### end Alembic commands ###

0 comments on commit 89dc06e

Please sign in to comment.