"""table accounting

Revision ID: cff59b3f0bc4
Revises: 3ae0d98f2ad3
Create Date: 2021-05-21 22:49:30.378415

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'cff59b3f0bc4'
down_revision = '3ae0d98f2ad3'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('accounting',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('user_id', sa.Integer(), nullable=True),
    sa.Column('sub_id', sa.Integer(), nullable=True),
    sa.Column('dateOfStart', sa.DateTime(), nullable=True),
    sa.Column('dateOfEnd', sa.DateTime(), nullable=True),
    sa.Column('status', sa.Boolean(), nullable=True),
    sa.Column('time_id', sa.Integer(), nullable=True),
    sa.Column('coach_id', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['sub_id'], ['sub.id'], ),
    sa.ForeignKeyConstraint(['time_id'], ['time.id'], ),
    sa.ForeignKeyConstraint(['user_id'], ['user.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###


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