pyelephant/alembic/versions/17946e7038d7_add_due_date_to_tasks.py

33 lines
570 B
Python
Raw Permalink Normal View History

2020-05-21 10:58:10 +10:00
"""add due date to tasks
Revision ID: 17946e7038d7
Revises: 719f2d1539c8
Create Date: 2020-05-21 10:49:26.110397
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '17946e7038d7'
down_revision = '719f2d1539c8'
branch_labels = None
depends_on = None
def upgrade():
op.add_column(
'tasks',
sa.Column(
'due_at',
sa.DateTime,
nullable=True
)
)
def downgrade():
with op.batch_alter_table('tasks') as tasks:
tasks.drop_column('due_at')