Skip to content

VOIP-1283-Fix-seed-migration-bind-parameter - #1155

Merged
pchero merged 1 commit into
mainfrom
VOIP-1283-Fix-seed-migration-bind-parameter
Aug 1, 2026
Merged

VOIP-1283-Fix-seed-migration-bind-parameter#1155
pchero merged 1 commit into
mainfrom
VOIP-1283-Fix-seed-migration-bind-parameter

Conversation

@pchero

@pchero pchero commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Fix the schedule seed migration failing at alembic upgrade with 'A value is required for bind parameter 28'. alembic op.execute() routes raw SQL through sqlalchemy.text(), which treats the bare colon in the JSON string literal '{"days":28}' as a bind-parameter marker. Replaced the JSON string literals with MySQL JSON_OBJECT() calls, which produce identical JSON values with no colon in the SQL text. Verified: all four op.execute statements in the revision now compile with zero bind parameters; the two create-table revisions contain no bare colons. The tables were created successfully before the seed failed, so recovery is simply re-running alembic upgrade head after this lands (the failed INSERT died at compile time, nothing was partially inserted).

  • bin-dbscheme-manager: Use JSON_OBJECT('days', 28) / JSON_OBJECT() for target_data in a5e6f559299c_schedule_schedules_seed_platform_jobs.py; document the colon/bind-parameter pitfall in the revision docstring

- bin-dbscheme-manager: Use JSON_OBJECT() instead of raw JSON string literals in the schedule seed migration; sqlalchemy.text() treats ':28' in '{"days":28}' as a bind parameter, failing alembic upgrade
@pchero
pchero merged commit 27838fb into main Aug 1, 2026
3 checks passed
@pchero
pchero deleted the VOIP-1283-Fix-seed-migration-bind-parameter branch August 1, 2026 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant