Text Extraction Done, UI Fixes Done, Extracted Template Layout Saved in DB
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
"""Add templates schema
|
||||
|
||||
Revision ID: 91b2545f5a30
|
||||
Revises:
|
||||
Create Date: 2026-06-01 16:28:57.181829
|
||||
|
||||
"""
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
import os
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = '91b2545f5a30'
|
||||
down_revision: Union[str, None] = None
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
def upgrade() -> None:
|
||||
# Read and execute the SQL schema script
|
||||
sql_path = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))), 'sql', '01_templates_schema.sql')
|
||||
with open(sql_path, 'r') as f:
|
||||
sql = f.read()
|
||||
op.execute(sql)
|
||||
|
||||
def downgrade() -> None:
|
||||
op.execute("DROP SCHEMA IF EXISTS templates CASCADE;")
|
||||
Reference in New Issue
Block a user