"""Add carts

Revision ID: 6730f03317df
Revises: b4f524e2140c
Create Date: 2022-09-13 19:41:33.181752

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '6730f03317df'
down_revision =  'b4f524e2140c'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('carts',
    sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('cart_number', sa.Integer(), nullable=False),
    sa.Column('name', sa.String(length=256), nullable=True),
    sa.Column('duration', sa.Integer(), nullable=True),
    sa.Column('path', sa.String(length=2048), nullable=True),
    sa.Column('enabled', sa.Boolean(), nullable=False),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('cart_number')
    )
    op.create_index(op.f('ix_carts_duration'), 'carts', ['duration'], unique=False)
    op.create_index(op.f('ix_carts_name'), 'carts', ['name'], unique=False)
    # ### end Alembic commands ###


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