mirror of
https://github.com/sstent/foodplanner.git
synced 2026-04-04 20:13:52 +00:00
added LLM data extractiondocker compose up --build -d --force-recreate; docker compose logs -f
This commit is contained in:
49
alembic/versions/882af51512ff_add_llm_configs_table.py
Normal file
49
alembic/versions/882af51512ff_add_llm_configs_table.py
Normal file
@@ -0,0 +1,49 @@
|
||||
"""Add llm_configs table
|
||||
|
||||
Revision ID: 882af51512ff
|
||||
Revises: 2498205b9e48
|
||||
Create Date: 2025-10-04 13:13:07.498772
|
||||
|
||||
"""
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = '882af51512ff'
|
||||
down_revision: Union[str, None] = '2498205b9e48'
|
||||
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.create_table('llm_configs',
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
sa.Column('openrouter_api_key', sa.String(), nullable=True),
|
||||
sa.Column('preferred_model', sa.String(), nullable=True),
|
||||
sa.PrimaryKeyConstraint('id')
|
||||
)
|
||||
op.create_index(op.f('ix_llm_configs_id'), 'llm_configs', ['id'], unique=False)
|
||||
op.drop_table('_litestream_seq')
|
||||
op.drop_table('_litestream_lock')
|
||||
op.drop_column('tracked_meals', 'quantity')
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column('tracked_meals', sa.Column('quantity', sa.FLOAT(), nullable=True))
|
||||
op.create_table('_litestream_lock',
|
||||
sa.Column('id', sa.INTEGER(), nullable=True)
|
||||
)
|
||||
op.create_table('_litestream_seq',
|
||||
sa.Column('id', sa.INTEGER(), nullable=True),
|
||||
sa.Column('seq', sa.INTEGER(), nullable=True),
|
||||
sa.PrimaryKeyConstraint('id')
|
||||
)
|
||||
op.drop_index(op.f('ix_llm_configs_id'), table_name='llm_configs')
|
||||
op.drop_table('llm_configs')
|
||||
# ### end Alembic commands ###
|
||||
Reference in New Issue
Block a user