-- 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;

