"""empty message

Revision ID: ada2d655fd63
Revises: 15b24ab9472f
Create Date: 2019-01-30 12:55:55.549096

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'ada2d655fd63'
down_revision = '15b24ab9472f'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('izlet',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('name', sa.String(length=140), nullable=True),
    sa.Column('description', sa.String(length=140), nullable=True),
    sa.Column('location', sa.String(length=140), nullable=True),
    sa.Column('transport', sa.String(length=70), nullable=True),
    sa.Column('begin', sa.Date(), nullable=True),
    sa.Column('end', sa.Date(), nullable=True),
    sa.Column('cost', sa.Numeric(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_izlet_begin'), 'izlet', ['begin'], unique=False)
    op.create_index(op.f('ix_izlet_end'), 'izlet', ['end'], unique=False)
    op.create_table('User Izleta',
    sa.Column('user_id', sa.Integer(), nullable=True),
    sa.Column('izlet_id', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['izlet_id'], ['izlet.id'], ),
    sa.ForeignKeyConstraint(['user_id'], ['user.id'], )
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('User Izleta')
    op.drop_index(op.f('ix_izlet_end'), table_name='izlet')
    op.drop_index(op.f('ix_izlet_begin'), table_name='izlet')
    op.drop_table('izlet')
    # ### end Alembic commands ###
