aboutsummaryrefslogtreecommitdiff
path: root/migrations/versions/878e8193ae4d_change_annotation_structure.py
blob: 1b37d5e2eb1643b4bc68bc4434ee13a1ccd9ac73 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
"""change annotation structure

Revision ID: 878e8193ae4d
Revises: 37a7d932fc02
Create Date: 2019-03-26 12:53:27.069030

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '878e8193ae4d'
down_revision = '37a7d932fc02'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table("annotation") as batch_op:
        batch_op.drop_column('time_start')
        batch_op.drop_column('time_end')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('annotation', sa.Column('time_end', sa.INTEGER(), nullable=True))
    op.add_column('annotation', sa.Column('time_start', sa.INTEGER(), nullable=True))
    # ### end Alembic commands ###