fix(migrations): revert migration 6 comment edit + pin immutability rule (LC-212) #255
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/LC-212-migration-6-revert-comment-edit"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
66801a8) made insideserver/migrations/settings/0006_drop_smtp_settings.sql. The SQL payload is untouched; only the prose comment is restored to the pre-LC-201 wording.sqlx::migrate!BLAKE3-hashes the entire file (comments included) and records that hash in_sqlx_migrationson first apply, then rechecks on every subsequent start. Comment swap = hash drift =migration 6 was previously applied but has been modifiedpanic fromserver/src/db/mod.rs:140, observed on c-01 staging during the LC-200 rollout.CLAUDE.mdunder## Architecture > ### Database Domain Separation. Names the rule (never edit a shipped.sqlfile, comments included), names the why (sqlx checksum) and the symptom (the exact panic above), and points contributors at adding a new migration or updating doc comments in code (e.g.,Mailer::from_env) instead of re-touching shipped files. Treats the rule as universal across migrators (refinery, golang-migrate, alembic, flyway).Why this is safe
DELETEpayload is byte-identical before and after the revert, so any database that has not yet applied migration 6 sees the same behaviour either way.UPDATE _sqlx_migrations SET checksum = ... WHERE version = 6;ops-hand fix. The c-01 settings.db is not in that bucket.Verification
just check-serverclean.just testclean across all integration binaries (no test included or asserted on the migration comment text).dev.a8n.run/a8n-tools-private/lets-chat:latest.SMTP mailer configuredlog line appears (gated on the LC-200 docker-repo PR that lands the renamed env vars + SOPS keys).Test plan
docker logs lets-chat-appshowsSMTP mailer configured, not the migration panic and notSMTP mailer not configured.chat@a8n.run.