23 lines
727 B
PL/PgSQL
23 lines
727 B
PL/PgSQL
BEGIN;
|
|
|
|
UPDATE hardware_agent_provider_credential
|
|
SET status='REVOKED',revoked_at=COALESCE(revoked_at,now())
|
|
WHERE status='SUSPENDED';
|
|
|
|
ALTER TABLE hardware_agent_provider_credential
|
|
DROP CONSTRAINT hardware_agent_provider_credential_status_check;
|
|
ALTER TABLE hardware_agent_provider_credential
|
|
ADD CONSTRAINT hardware_agent_provider_credential_status_check
|
|
CHECK (status IN ('ACTIVE','REVOKED'));
|
|
|
|
DROP TABLE device_activation_transition;
|
|
DROP INDEX device_tenant_activation_state_idx;
|
|
ALTER TABLE device
|
|
DROP CONSTRAINT device_activation_state_check,
|
|
DROP COLUMN activation_updated_at,
|
|
DROP COLUMN activation_reason,
|
|
DROP COLUMN activation_revision,
|
|
DROP COLUMN activation_state;
|
|
|
|
COMMIT;
|