Files
lcbp3/specs/99-archives/history/patch-drop-recipient-fk.sql
admin c90a664f53
All checks were successful
Build and Deploy / deploy (push) Successful in 1m0s
260222:1053 20260222 refactor specs/ #1 03-Data-and-Storage
2026-02-22 10:53:23 +07:00

11 lines
494 B
SQL

-- Patch: Drop FK constraint for recipient_organization_id
-- Required because -1 is used as sentinel value for "all organizations"
-- Run this on lcbp3_dev database
-- Find and drop the FK constraint(s)
-- The constraint names may vary, check with:
-- SHOW CREATE TABLE document_number_counters;
-- Drop both FK constraints
ALTER TABLE document_number_counters DROP FOREIGN KEY document_number_counters_ibfk_3;
ALTER TABLE document_number_counters DROP FOREIGN KEY fk_recipient_when_not_all;