This commit is contained in:
Jake Kasper
2025-09-05 11:48:03 -04:00
parent ea4f523008
commit ee69c6c99a
2 changed files with 12 additions and 19 deletions

View File

@@ -0,0 +1,10 @@
-- Set application_logs.lawn_section_id to ON DELETE SET NULL to preserve history
ALTER TABLE application_logs
DROP CONSTRAINT IF EXISTS application_logs_lawn_section_id_fkey;
ALTER TABLE application_logs
ADD CONSTRAINT application_logs_lawn_section_id_fkey
FOREIGN KEY (lawn_section_id) REFERENCES lawn_sections(id) ON DELETE SET NULL;
SELECT 'application_logs.lawn_section_id now ON DELETE SET NULL' as migration_status;