"""empty message

Revision ID: 2651707e9ee2
Revises: cac6fdb66c9c
Create Date: 2022-08-14 23:40:31.282291

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '2651707e9ee2'
down_revision = 'cac6fdb66c9c'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('node_config')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('node_config',
    sa.Column('is_effective', sa.BOOLEAN(), autoincrement=False, nullable=False),
    sa.Column('min_debtor_id', sa.BIGINT(), autoincrement=False, nullable=False),
    sa.Column('max_debtor_id', sa.BIGINT(), autoincrement=False, nullable=False),
    sa.CheckConstraint('is_effective = true', name='node_config_is_effective_check'),
    sa.CheckConstraint('min_debtor_id <= max_debtor_id', name='node_config_check'),
    sa.PrimaryKeyConstraint('is_effective', name='node_config_pkey'),
    comment='Represents the global node configuration (a singleton). The node is responsible only for debtor IDs that are within the interval [min_debtor_id, max_debtor_id].'
    )
    # ### end Alembic commands ###
