krona-staff/migrations/0013_owner_workflows.down.sql
KAgent 89621ea069 Checkpoint interrupted develop for task staff-prod-ready-0930
Task: staff-prod-ready-0930
Run: 4ea6adb5-b850-4f90-ad7b-74f92749b406
2026-09-30 10:42:45 +00:00

12 lines
533 B
SQL

DROP TABLE IF EXISTS staff_biometric_consents;
DROP TABLE IF EXISTS staff_batch_notifications;
DROP TABLE IF EXISTS staff_payroll_batch_lines;
DROP TABLE IF EXISTS staff_payroll_batches;
DROP TABLE IF EXISTS staff_access_grants;
ALTER TABLE staff_sync_devices
DROP CONSTRAINT IF EXISTS staff_sync_devices_tenant_id_org_unit_id_fkey;
ALTER TABLE staff_sync_devices
ADD CONSTRAINT staff_sync_devices_tenant_id_org_unit_id_fkey
FOREIGN KEY (tenant_id, org_unit_id) REFERENCES staff_org_units (tenant_id, id) ON DELETE SET NULL;