Update initial Alembic migration script for SQLite setup

This commit is contained in:
Automated Action 2025-06-05 07:47:02 +00:00
parent 8e743adf11
commit c64d65ebc8

View File

@ -17,12 +17,28 @@ depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
pass
# ### end Alembic commands ###
# ### Initial database setup ###
# This migration is a placeholder to establish the initial database state.
# SQLite-specific configuration is included in env.py with render_as_batch=True
# Create a version tracking table for Alembic
op.create_table(
'alembic_version',
sa.Column('version_num', sa.String(length=32), nullable=False),
sa.PrimaryKeyConstraint('version_num')
)
# Insert the current version
op.bulk_insert(
sa.table('alembic_version',
sa.column('version_num', sa.String(length=32))),
[{'version_num': revision}]
)
# ### end commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
pass
# ### end Alembic commands ###
# ### Drop everything created in this migration ###
op.drop_table('alembic_version')
# ### end commands ###