16 lines
625 B
SQL
16 lines
625 B
SQL
ALTER TABLE staff_sync_command_inbox
|
|
DROP CONSTRAINT IF EXISTS staff_sync_command_inbox_correlation_id_check,
|
|
DROP CONSTRAINT IF EXISTS staff_sync_command_inbox_causation_id_check;
|
|
|
|
ALTER TABLE staff_sync_command_inbox
|
|
ALTER COLUMN correlation_id TYPE VARCHAR(36),
|
|
ALTER COLUMN causation_id TYPE VARCHAR(36);
|
|
|
|
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;
|