"""rename kv_store table

Revision ID: 2a334994fcb3
Revises: d36e2ec09f27
Create Date: 2021-10-10 11:47:58.500027

"""

import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision = "2a334994fcb3"
down_revision = "d36e2ec09f27"
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.rename_table("kv_store", "output_store")
    op.execute(sa.text("ALTER SEQUENCE kv_store_id_seq RENAME TO output_store_id_seq"))
    op.execute(sa.text("ALTER INDEX kv_store_pkey RENAME TO output_store_pkey"))
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.rename_table("output_store", "kv_store")
    op.execute(sa.text("ALTER SEQUENCE output_store_id_seq RENAME TO kv_store_id_seq"))
    op.execute(sa.text("ALTER INDEX output_store_pkey RENAME TO kv_store_pkey"))
    # ### end Alembic commands ###
