Release: develop -> main#4244
Merged
Merged
Conversation
…4221) * feat(bank): activate Bank Frick payout accounts (prd data migration) Prd-guarded data migration (ENVIRONMENT === 'prd', no-op elsewhere) that follows docs/bank-frick-operations.md section 3: inserts the two new Bank Frick rows (EUR/CHF) active, renames the dormant legacy rows, seeds the per-bank import watermark, and removes the two default-off Frick process sentinels. Idempotent (WHERE NOT EXISTS per IBAN, ON CONFLICT DO NOTHING). sendPriority=500 makes Frick the primary EUR/CHF sender. Validated against Postgres 17 with a prod-shaped fixture (up + down); CI does not exercise the prd-guarded SQL. * docs(bank): English comments + document down() rollback scope in Frick activation migration Translate the sendPriority comment to English (CONTRIBUTING English-only, public repo) and document that down() is a hard IBAN-scoped removal that only reverts cleanly before the new rows are referenced by a payout. Comment-only; no SQL change. * fix(bank): resolve id sequence via pg_get_serial_sequence + scope down() legacy rename Replace the hard-coded 'bank_id_seq' with pg_get_serial_sequence('bank','id') (matching migration/seed/seed.js) so the prd-guarded migration cannot crash on boot if the production id sequence carries a different name after the MSSQL->PG cutover. Scope the down() legacy-rename symmetrically to up()'s selection (dormant rows, excluding the new IBANs). Re-validated against Postgres 17 (up + down). Comment/SQL-only. * docs(bank): correct down() legacy-rename comment to not overclaim strict symmetry The scoped down() rename is not a strict inverse of up() (up() only renames rows named exactly 'Bank Frick'); document the pre-existing '(legacy)'-row edge honestly instead of asserting it cannot occur. Comment-only. * fix(bank): converge pre-existing rows to active via ON CONFLICT; keep runbook named sequence Two fixes for the activation migration: (1) INSERT ... ON CONFLICT (iban,bic) DO UPDATE so a row pre-created inactive by the manual runbook §3.1 procedure converges to the intended active state instead of silently no-op'ing; (2) keep the runbook §3.1 named-sequence setval ('bank_id_seq' + GREATEST) rather than pg_get_serial_sequence, which returns NULL (and crashes setval) if the post-cutover prod sequence is not OWNED by the column. Re-validated against Postgres 17: fresh insert, pre-existing-inactive convergence, and idempotent re-run all pass. * docs(bank): fix stale JSDoc header to match the named-sequence implementation The step-3 header still claimed pg_get_serial_sequence after the code was reverted to the named 'bank_id_seq' sequence; align the header with the code and the inline rationale. Comment-only. * docs(bank): state down() rollout assumption + lossy pre-created-path revert explicitly up() is defensively idempotent for the manual §3.1 pre-created path (ON CONFLICT DO UPDATE/DO NOTHING); document at the top of down() that the code-owned rollout makes down() a clean inverse, and that on the pre-created path down() is an intentional lossy hard-removal (rollback of a used rail is an Ops procedure). Trim the now-redundant bank-delete comment. Comment-only. * fix(bank): activate Bank Frick as fallback (sendPriority 2000), not primary The activation set Frick primary (sendPriority=500), which would cut all EUR+CHF payouts over from the incumbents (Olkypay/Yapeal). The intended state is the runbook §3.1 default fallback (sendPriority=2000): Frick is live and send-capable but sits above the incumbents' 1000, loses ties and carries no traffic - the incumbents stay primary. Making Frick primary is a separate, deliberate Ops cutover (runbook §3.3), not part of this activation.
github-actions
Bot
requested review from
TaprootFreak and
davidleomay
as code owners
July 16, 2026 16:33
TaprootFreak
approved these changes
Jul 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automatic Release PR
This PR was automatically created after changes were pushed to develop.
Commits: 1 new commit(s)
Checklist