expiry date migration in alembic

This commit is contained in:
2023-04-18 17:13:56 -04:00
parent 5d6695d608
commit dca5b35395

View 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 ###