"""empty message

Revision ID: c63b4aa08fd8
Revises: 09bbbdb4d2a5
Create Date: 2023-01-10 17:18:02.595704

"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql

# revision identifiers, used by Alembic.
revision = 'c63b4aa08fd8'
down_revision = '09bbbdb4d2a5'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('info_nuggets',
    sa.Column('id', postgresql.UUID(as_uuid=True), nullable=False),
    sa.Column('name', sa.String(), nullable=False),
    sa.Column('answers_en', sa.ARRAY(sa.String()), nullable=False),
    sa.Column('answers_de', sa.ARRAY(sa.String()), nullable=False),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('questions',
    sa.Column('id', postgresql.UUID(as_uuid=True), nullable=False),
    sa.Column('official', sa.Boolean(), nullable=False),
    sa.Column('question_en', sa.String(), nullable=False),
    sa.Column('question_de', sa.String(), nullable=False),
    sa.Column('placeholder_en', sa.String(), nullable=False),
    sa.Column('placeholder_de', sa.String(), nullable=False),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('card',
    sa.Column('id', postgresql.UUID(as_uuid=True), nullable=False),
    sa.Column('type', sa.String(), nullable=False),
    sa.Column('user_id', postgresql.UUID(as_uuid=True), nullable=False),
    sa.Column('image_id', postgresql.UUID(as_uuid=True), nullable=False),
    sa.ForeignKeyConstraint(['image_id'], ['image.id'], ),
    sa.ForeignKeyConstraint(['user_id'], ['user.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('panel',
    sa.Column('type', sa.String(), nullable=False),
    sa.Column('id', postgresql.UUID(as_uuid=True), nullable=False),
    sa.Column('card_id', postgresql.UUID(as_uuid=True), nullable=False),
    sa.Column('position', sa.Integer(), nullable=False),
    sa.Column('image_id', postgresql.UUID(as_uuid=True), nullable=True),
    sa.Column('nuggets', sa.String(), nullable=True),
    sa.Column('question_id', postgresql.UUID(as_uuid=True), nullable=True),
    sa.Column('answer', sa.String(), nullable=True),
    sa.ForeignKeyConstraint(['card_id'], ['card.id'], ),
    sa.ForeignKeyConstraint(['image_id'], ['image.id'], ),
    sa.ForeignKeyConstraint(['question_id'], ['questions.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###


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