Skip to content

Commit

Permalink
fix(video): add migration script
Browse files Browse the repository at this point in the history
  • Loading branch information
abrichr authored Feb 29, 2024
1 parent 76b55fd commit b769c4a
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions alembic/versions/530f0663324e_add_recording_video_start_time.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
"""add Recording.video_start_time
Revision ID: 530f0663324e
Revises: 8713b142f5de
Create Date: 2024-02-16 10:31:05.020772
"""
from alembic import op
import sqlalchemy as sa

from openadapt.models import ForceFloat


# revision identifiers, used by Alembic.
revision = '530f0663324e'
down_revision = '8713b142f5de'
branch_labels = None
depends_on = None


def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('recording', schema=None) as batch_op:
batch_op.add_column(sa.Column('video_start_time', ForceFloat(precision=10, scale=2, asdecimal=False), nullable=True))

# ### end Alembic commands ###


def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('recording', schema=None) as batch_op:
batch_op.drop_column('video_start_time')

# ### end Alembic commands ###

0 comments on commit b769c4a

Please sign in to comment.