drop column body_html and title_url
This commit is contained in:
30
cao_blogr/alembic/versions/20220505_5ad5927ad64d.py
Normal file
30
cao_blogr/alembic/versions/20220505_5ad5927ad64d.py
Normal file
@@ -0,0 +1,30 @@
|
||||
"""init
|
||||
|
||||
Revision ID: 5ad5927ad64d
|
||||
Revises: 1a99bede8b76
|
||||
Create Date: 2022-05-05 15:49:10.984878
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '5ad5927ad64d'
|
||||
down_revision = '1a99bede8b76'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column('entries', sa.Column('author', sa.UnicodeText(), nullable=True))
|
||||
op.drop_column('entries', 'title_url')
|
||||
op.drop_column('entries', 'body_html')
|
||||
# ### end Alembic commands ###
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column('entries', sa.Column('body_html', sa.TEXT(), nullable=True))
|
||||
op.add_column('entries', sa.Column('title_url', sa.VARCHAR(length=255), nullable=True))
|
||||
op.drop_column('entries', 'author')
|
||||
# ### end Alembic commands ###
|
||||
Reference in New Issue
Block a user