"""init db

Revision ID: 89adeec916e0
Revises: 
Create Date: 2018-10-19 15:03:38.334631

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '89adeec916e0'
down_revision = None
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('record',
                    sa.Column('id', sa.Integer(), nullable=False),
                    sa.Column('done', sa.Boolean(), nullable=True),
                    sa.Column('failed', sa.Boolean(), nullable=True),
                    sa.Column('status', sa.String(32), nullable=True),
                    sa.Column('progress', sa.Integer(), nullable=True),
                    sa.Column('job_id', sa.String(64), nullable=True),
                    sa.Column('created_at', sa.DateTime(), nullable=False),
                    sa.Column('finished_at', sa.DateTime(), nullable=True),
                    sa.Column('start_seconds', sa.Integer(), nullable=True),
                    sa.Column('end_seconds', sa.Integer(), nullable=True),
                    sa.PrimaryKeyConstraint('id')
                    )
    op.create_table('video',
                    sa.Column('id', sa.Integer(), nullable=False),
                    sa.Column('location', sa.String(128), nullable=True),
                    sa.Column('score', sa.Float(), nullable=True),
                    sa.Column('start_frame', sa.Integer(), nullable=True),
                    sa.Column('end_frame', sa.Integer(), nullable=True),
                    sa.Column('record_id', sa.Integer(), nullable=False),
                    sa.ForeignKeyConstraint(['record_id'], ['record.id'], ),
                    sa.PrimaryKeyConstraint('id')
                    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('video')
    op.drop_table('record')
    # ### end Alembic commands ###

"""init db

Revision ID: 89adeec916e0
Revises: 
Create Date: 2018-10-19 15:03:38.334631

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '89adeec916e0'
down_revision = None
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('record',
                    sa.Column('id', sa.Integer(), nullable=False),
                    sa.Column('done', sa.Boolean(), nullable=True),
                    sa.Column('failed', sa.Boolean(), nullable=True),
                    sa.Column('status', sa.String(32), nullable=True),
                    sa.Column('progress', sa.Integer(), nullable=True),
                    sa.Column('job_id', sa.String(64), nullable=True),
                    sa.Column('created_at', sa.DateTime(), nullable=False),
                    sa.Column('finished_at', sa.DateTime(), nullable=True),
                    sa.Column('start_seconds', sa.Integer(), nullable=True),
                    sa.Column('end_seconds', sa.Integer(), nullable=True),
                    sa.PrimaryKeyConstraint('id')
                    )
    op.create_table('video',
                    sa.Column('id', sa.Integer(), nullable=False),
                    sa.Column('location', sa.String(128), nullable=True),
                    sa.Column('score', sa.Float(), nullable=True),
                    sa.Column('start_frame', sa.Integer(), nullable=True),
                    sa.Column('end_frame', sa.Integer(), nullable=True),
                    sa.Column('record_id', sa.Integer(), nullable=False),
                    sa.ForeignKeyConstraint(['record_id'], ['record.id'], ),
                    sa.PrimaryKeyConstraint('id')
                    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('video')
    op.drop_table('record')
    # ### end Alembic commands ###

init db  Revision ID: 89adeec916e0 Revises:  Create Date: 2018-10-19 15:03:38.334631 # revision identifiers, used by Alembic. # ### commands auto generated by Alembic - please adjust! ### # ### end Alembic commands ### # ### commands auto generated by Alembic - please adjust! ### # ### end Alembic commands ###