expiry date migration in alembic
This commit is contained in:
32
app/migrations/versions/625eb20835b5_add_expiry_date.py
Normal file
32
app/migrations/versions/625eb20835b5_add_expiry_date.py
Normal file
@@ -0,0 +1,32 @@
|
||||
"""add expiry date
|
||||
|
||||
Revision ID: 625eb20835b5
|
||||
Revises:
|
||||
Create Date: 2023-04-18 17:11:23.703222
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '625eb20835b5'
|
||||
down_revision = None
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table('task', schema=None) as batch_op:
|
||||
batch_op.add_column(sa.Column('expiry_date', sa.String(length=100), nullable=True))
|
||||
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table('task', schema=None) as batch_op:
|
||||
batch_op.drop_column('expiry_date')
|
||||
|
||||
# ### end Alembic commands ###
|
Reference in New Issue
Block a user