-- Migration from 050 to 051\012\012-- change archiving status names to be consistent with UI & introduce a domain \012ALTER TABLE external_data DROP CONSTRAINT exda_status_enum_ck;\012\012UPDATE external_data SET status = 'AVAILABLE' WHERE status = 'ACTIVE';\012UPDATE external_data SET status = 'UNARCHIVE_PENDING' WHERE status = 'ACTIVATION_IN_PROGRESS';\012UPDATE external_data SET status = 'ARCHIVE_PENDING' WHERE status = 'ARCHIVIZATION_IN_PROGRESS';\012\012CREATE DOMAIN archiving_status AS VARCHAR(100);\012ALTER DOMAIN archiving_status ADD CONSTRAINT archiving_status_check \012      CHECK (VALUE IN ('LOCKED', 'AVAILABLE', 'ARCHIVED', 'ARCHIVE_PENDING', 'UNARCHIVE_PENDING'));\012\012ALTER TABLE external_data ALTER COLUMN status TYPE archiving_status;\012ALTER TABLE external_data ALTER COLUMN status SET DEFAULT 'AVAILABLE';\012\012-- add is_archiver_configured flag to data_stores table\012ALTER TABLE data_stores ADD COLUMN is_archiver_configured BOOLEAN_CHAR NOT NULL DEFAULT 'F';\012