ALTER TABLE transfer_properties
    ADD transferType VARCHAR(50);

UPDATE transfer_properties
    SET transferType = 'ORDER';

ALTER TABLE transfer_properties
  ALTER COLUMN transferType SET NOT NULL;

ALTER TABLE transfer_properties
  DROP CONSTRAINT IF EXISTS uk_sprkvmtubsjd58jc0afdycmiy;

CREATE UNIQUE INDEX
  uk_tp_by_facility_and_transfer_type
  ON transfer_properties (transferType, facilityId);


ALTER TABLE transfer_properties
    ADD transferType VARCHAR(50);

UPDATE transfer_properties
    SET transferType = 'ORDER';

ALTER TABLE transfer_properties
  ALTER COLUMN transferType SET NOT NULL;

ALTER TABLE transfer_properties
  DROP CONSTRAINT IF EXISTS transfer_properties_facility_id_unique;

CREATE UNIQUE INDEX
  transfer_properties_facility_id_transfer_type_unique
  ON transfer_properties (transferType, facilityId);


Remove constraint that was renamed, rename new constraint to be more descriptive.
OLMIS-5480: Remove constraint that was renamed, rename new constraint to be more descriptive.
