"""empty message

Revision ID: 64e8faaec9c6
Revises: 
Create Date: 2019-01-08 15:23:37.894554

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '64e8faaec9c6'
down_revision = None
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('country',
    sa.Column('country_id', sa.Integer(), nullable=False),
    sa.Column('name', sa.String(), nullable=True),
    sa.PrimaryKeyConstraint('country_id')
    )
    op.create_table('grape',
    sa.Column('grape_id', sa.Integer(), nullable=False),
    sa.Column('name', sa.String(), nullable=True),
    sa.Column('colour', sa.String(), nullable=True),
    sa.PrimaryKeyConstraint('grape_id')
    )
    op.create_table('region',
    sa.Column('region_id', sa.Integer(), nullable=False),
    sa.Column('name', sa.String(), nullable=True),
    sa.Column('country_id', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['country_id'], ['country.country_id'], ),
    sa.PrimaryKeyConstraint('region_id')
    )
    op.create_table('wine',
    sa.Column('wine_id', sa.Integer(), nullable=False),
    sa.Column('name', sa.String(), nullable=True),
    sa.Column('region_id', sa.Integer(), nullable=True),
    sa.Column('body', sa.String(), nullable=True),
    sa.Column('sweetness', sa.String(), nullable=True),
    sa.Column('wine_type', sa.String(), nullable=True),
    sa.ForeignKeyConstraint(['region_id'], ['region.region_id'], ),
    sa.PrimaryKeyConstraint('wine_id')
    )
    op.create_table('ingredients',
    sa.Column('ingredients_id', sa.Integer(), nullable=False),
    sa.Column('grape_id', sa.Integer(), nullable=True),
    sa.Column('wine_id', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['grape_id'], ['grape.grape_id'], ),
    sa.ForeignKeyConstraint(['wine_id'], ['wine.wine_id'], ),
    sa.PrimaryKeyConstraint('ingredients_id')
    )
    op.create_table('tasting_note',
    sa.Column('tastingnote_id', sa.Integer(), nullable=False),
    sa.Column('wine_id', sa.Integer(), nullable=True),
    sa.Column('note', sa.String(), nullable=True),
    sa.ForeignKeyConstraint(['wine_id'], ['wine.wine_id'], ),
    sa.PrimaryKeyConstraint('tastingnote_id')
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('tasting_note')
    op.drop_table('ingredients')
    op.drop_table('wine')
    op.drop_table('region')
    op.drop_table('grape')
    op.drop_table('country')
    # ### end Alembic commands ###
