"""empty message

Revision ID: c48c45d5402e
Revises: ead3644aab16
Create Date: 2023-12-16 16:05:24.293304

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'c48c45d5402e'
down_revision = 'ead3644aab16'
branch_labels = None
depends_on = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index('filepaths_un', table_name='filepaths', schema='fansly', postgresql_where='((story_id IS NOT NULL) OR (post_id IS NOT NULL) OR (message_id IS NOT NULL) OR (mass_message_id IS NOT NULL) OR (media_id IS NOT NULL))')
    op.create_unique_constraint(None, 'filepaths', ['story_id', 'post_id', 'message_id', 'mass_message_id', 'media_id'], schema='fansly')
    op.drop_index('filepaths_un', table_name='filepaths', schema='onlyfans', postgresql_where='((story_id IS NOT NULL) OR (post_id IS NOT NULL) OR (message_id IS NOT NULL) OR (mass_message_id IS NOT NULL) OR (media_id IS NOT NULL))')
    op.create_unique_constraint(None, 'filepaths', ['story_id', 'post_id', 'message_id', 'mass_message_id', 'media_id'], schema='onlyfans')
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, 'filepaths', schema='onlyfans', type_='unique')
    op.create_index('filepaths_un', 'filepaths', ['story_id', 'post_id', 'message_id', 'mass_message_id', 'media_id'], unique=False, schema='onlyfans', postgresql_where='((story_id IS NOT NULL) OR (post_id IS NOT NULL) OR (message_id IS NOT NULL) OR (mass_message_id IS NOT NULL) OR (media_id IS NOT NULL))')
    op.drop_constraint(None, 'filepaths', schema='fansly', type_='unique')
    op.create_index('filepaths_un', 'filepaths', ['story_id', 'post_id', 'message_id', 'mass_message_id', 'media_id'], unique=False, schema='fansly', postgresql_where='((story_id IS NOT NULL) OR (post_id IS NOT NULL) OR (message_id IS NOT NULL) OR (mass_message_id IS NOT NULL) OR (media_id IS NOT NULL))')
    # ### end Alembic commands ###
