"""Embeddings for OpenAI

Revision ID: 4f22dd6260e3
Revises: f5bbaed3a9ee
Create Date: 2024-04-30 21:18:35.548528

"""
from alembic import op
import sqlalchemy as sa
import pgvector


# revision identifiers, used by Alembic.
revision = '4f22dd6260e3'
down_revision = 'f5bbaed3a9ee'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('embedding_small_open_ai',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('doc_vers_id', sa.Integer(), nullable=False),
    sa.Column('active', sa.Boolean(), nullable=False),
    sa.Column('embedding', pgvector.sqlalchemy.Vector(dim=1536), nullable=False),
    sa.ForeignKeyConstraint(['doc_vers_id'], ['document_version.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('embedding_small_open_ai')
    # ### end Alembic commands ###
