"""Book preview

Revision ID: abbc38275032
Revises: 6c616cc9d1f0
Create Date: 2026-02-01 14:41:14.611420

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa
import sqlmodel, pgvector


# revision identifiers, used by Alembic.
revision: str = 'abbc38275032'
down_revision: Union[str, None] = '6c616cc9d1f0'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('book', sa.Column('preview_id', sa.Uuid(), nullable=True))
    op.create_index(op.f('ix_book_preview_id'), 'book', ['preview_id'], unique=True)
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_book_preview_id'), table_name='book')
    op.drop_column('book', 'preview_id')
    # ### end Alembic commands ###
