Added OpenAI large embedding / improve migration and upgrade handling for containers
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
"""Add Embedding model for OpenAI large model
|
||||
|
||||
Revision ID: 5d5437d81041
|
||||
Revises: d173cea8d204
|
||||
Create Date: 2024-07-04 15:49:43.665685
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
import pgvector
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '5d5437d81041'
|
||||
down_revision = 'd173cea8d204'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_table('embedding_large_openai',
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
sa.Column('embedding', pgvector.sqlalchemy.Vector(dim=3072), nullable=False),
|
||||
sa.ForeignKeyConstraint(['id'], ['embeddings.id'], ),
|
||||
sa.PrimaryKeyConstraint('id')
|
||||
)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_table('embedding_large_openai')
|
||||
# ### end Alembic commands ###
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user