--- clients-integration-hash

ALTER TABLE client_sessions
  ADD integration_hash VARCHAR(40);

DROP INDEX client_sessions_integration_credentials_id_uniq;
CREATE UNIQUE INDEX client_sessions_integration_hash_uniq
  ON client_sessions (integration_hash)
  WHERE integration_hash IS NOT NULL;
