"""empty message

Revision ID: d14fae4eb0f7
Revises: c26de9879ad1
Create Date: 2023-11-14 11:57:29.391352

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'd14fae4eb0f7'
down_revision = 'c26de9879ad1'
branch_labels = None
depends_on = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('linked_posts',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('post_id', sa.BigInteger(), nullable=False),
    sa.Column('linked_post_id', sa.BigInteger(), nullable=False),
    sa.ForeignKeyConstraint(['linked_post_id'], ['fansly.x_posts.id'], ),
    sa.ForeignKeyConstraint(['post_id'], ['fansly.x_posts.id'], ),
    sa.PrimaryKeyConstraint('id'),
    schema='fansly'
    )
    op.create_table('linked_posts',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('post_id', sa.BigInteger(), nullable=False),
    sa.Column('linked_post_id', sa.BigInteger(), nullable=False),
    sa.ForeignKeyConstraint(['linked_post_id'], ['onlyfans.x_posts.id'], ),
    sa.ForeignKeyConstraint(['post_id'], ['onlyfans.x_posts.id'], ),
    sa.PrimaryKeyConstraint('id'),
    schema='onlyfans'
    )
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('linked_posts', schema='onlyfans')
    op.drop_table('linked_posts', schema='fansly')
    # ### end Alembic commands ###
