"""add marked table

Revision ID: 66eb96210d4a
Revises: <PASSWORD>
Create Date: 2020-05-31 00:05:21.489564

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '66eb96210d4a'
down_revision = '<PASSWORD>'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('marked',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('fact_id', sa.Integer(), nullable=False),
    sa.Column('user_id', sa.Integer(), nullable=False),
    sa.Column('date_marked', sa.TIMESTAMP(timezone=True), nullable=False),
    sa.ForeignKeyConstraint(['fact_id'], ['fact.fact_id'], ),
    sa.ForeignKeyConstraint(['user_id'], ['user.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_marked_id'), 'marked', ['id'], unique=False)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_marked_id'), table_name='marked')
    op.drop_table('marked')
    # ### end Alembic commands ###

"""add marked table

Revision ID: 66eb96210d4a
Revises: <PASSWORD>
Create Date: 2020-05-31 00:05:21.489564

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '66eb96210d4a'
down_revision = '<PASSWORD>'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('marked',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('fact_id', sa.Integer(), nullable=False),
    sa.Column('user_id', sa.Integer(), nullable=False),
    sa.Column('date_marked', sa.TIMESTAMP(timezone=True), nullable=False),
    sa.ForeignKeyConstraint(['fact_id'], ['fact.fact_id'], ),
    sa.ForeignKeyConstraint(['user_id'], ['user.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_marked_id'), 'marked', ['id'], unique=False)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_marked_id'), table_name='marked')
    op.drop_table('marked')
    # ### end Alembic commands ###

add marked table  Revision ID: 66eb96210d4a Revises: <PASSWORD> Create Date: 2020-05-31 00:05:21.489564 # 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 ###