"""align category constraint names

Revision ID: c0d1e2f3a4b5
Revises: b9c0d1e2f3a4
"""
from alembic import op

revision = "c0d1e2f3a4b5"
down_revision = "b9c0d1e2f3a4"
branch_labels = None
depends_on = None

def upgrade():
    op.execute("ALTER TABLE expense_categories RENAME CONSTRAINT uq_expense_categorie_business_name TO uq_expense_category_business_name")
    op.execute("ALTER TABLE other_income_categories RENAME CONSTRAINT uq_other_income_categorie_business_name TO uq_other_income_category_business_name")

def downgrade():
    op.execute("ALTER TABLE expense_categories RENAME CONSTRAINT uq_expense_category_business_name TO uq_expense_categorie_business_name")
    op.execute("ALTER TABLE other_income_categories RENAME CONSTRAINT uq_other_income_category_business_name TO uq_other_income_categorie_business_name")
