26 lines
513 B
Python
26 lines
513 B
Python
"""Create the initial KnowledgeGraph schema.
|
|
|
|
Revision ID: 20261013_0001
|
|
Revises:
|
|
Create Date: 2026-10-13
|
|
"""
|
|
|
|
from alembic import op
|
|
|
|
from graphrag_platform.models import Base
|
|
|
|
revision = "20261013_0001"
|
|
down_revision = None
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
connection = op.get_bind()
|
|
connection.exec_driver_sql("CREATE EXTENSION IF NOT EXISTS vector")
|
|
Base.metadata.create_all(bind=connection)
|
|
|
|
|
|
def downgrade() -> None:
|
|
Base.metadata.drop_all(bind=op.get_bind())
|