diff --git a/migrations/versions/initial_migration.py b/migrations/versions/initial_migration.py index 917af97..99301f7 100644 --- a/migrations/versions/initial_migration.py +++ b/migrations/versions/initial_migration.py @@ -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 ### \ No newline at end of file + # ### Drop everything created in this migration ### + op.drop_table('alembic_version') + # ### end commands ### \ No newline at end of file