"""added survey form type and other display options

Revision ID: 3f4fcfd3d063
Revises: 29d545c18474
Create Date: 2019-10-13 06:04:13.437075

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '3f4fcfd3d063'
down_revision = '29d545c18474'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('form', sa.Column('show_map', sa.Boolean(), nullable=True))
    op.add_column('form', sa.Column('show_moment', sa.Boolean(), nullable=True))
    op.add_column('form', sa.Column('show_progress', sa.Boolean(), nullable=True))
    op.add_column('submission', sa.Column('participant_updated', sa.DateTime(), nullable=True))
    op.add_column('submission', sa.Column('serial_no', sa.String(), nullable=True))
    op.create_index(op.f('ix_submission_participant_updated'), 'submission', ['participant_updated'], unique=False)
    op.create_index(op.f('ix_submission_serial_no'), 'submission', ['serial_no'], unique=False)
    op.create_index(op.f('ix_submission_submission_type'), 'submission', ['submission_type'], unique=False)
    op.create_index(op.f('ix_submission_updated'), 'submission', ['updated'], unique=False)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_submission_updated'), table_name='submission')
    op.drop_index(op.f('ix_submission_submission_type'), table_name='submission')
    op.drop_index(op.f('ix_submission_serial_no'), table_name='submission')
    op.drop_index(op.f('ix_submission_participant_updated'), table_name='submission')
    op.drop_column('submission', 'serial_no')
    op.drop_column('submission', 'participant_updated')
    op.drop_column('form', 'show_progress')
    op.drop_column('form', 'show_moment')
    op.drop_column('form', 'show_map')
    # ### end Alembic commands ###
