"""auto

Revision ID: 6fa90873583c
Revises: 38bd60b60b36
Create Date: 2021-03-15 13:54:54.741214+03:00

"""
import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision = '6fa90873583c'
down_revision = '38bd60b60b36'
branch_labels = None
depends_on = None


def upgrade():
    schema_upgrades()
    data_upgrades()


def downgrade():
    data_downgrades()
    schema_downgrades()


def schema_upgrades():
    """schema upgrade migrations go here."""
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_unique_constraint('uq_fields_id', 'fields', ['id'])
    op.create_unique_constraint('uq_not_valid_schema_id', 'not_valid_schema', ['id'])
    op.create_unique_constraint('uq_not_valid_subscription_schema_id', 'not_valid_subscription_schema', ['id'])
    op.create_unique_constraint('uq_operation_id', 'operation', ['id'])
    op.create_unique_constraint('uq_schema_id', 'schema', ['id'])
    op.create_unique_constraint('uq_subscription_schema_id', 'subscription_schema', ['id'])
    # ### end Alembic commands ###


def schema_downgrades():
    """schema downgrade migrations go here."""
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint('uq_subscription_schema_id', 'subscription_schema', type_='unique')
    op.drop_constraint('uq_schema_id', 'schema', type_='unique')
    op.drop_constraint('uq_operation_id', 'operation', type_='unique')
    op.drop_constraint('uq_not_valid_subscription_schema_id', 'not_valid_subscription_schema', type_='unique')
    op.drop_constraint('uq_not_valid_schema_id', 'not_valid_schema', type_='unique')
    op.drop_constraint('uq_fields_id', 'fields', type_='unique')
    # ### end Alembic commands ###


def data_upgrades():
    """Add any optional data upgrade migrations here!"""
    pass


def data_downgrades():
    """Add any optional data downgrade migrations here!"""
    pass
