diff --git a/migrations/app/migrations_manifest.txt b/migrations/app/migrations_manifest.txt index 2d2d74fbce4..436ee2c68c1 100644 --- a/migrations/app/migrations_manifest.txt +++ b/migrations/app/migrations_manifest.txt @@ -905,3 +905,4 @@ 20240222154935_add_sit_delivery_miles_to_mto_service_items.up.sql 20240223200739_updateDutyLocationsZip.up.sql 20240226183440_add_county_column_to_address_table.up.sql +20240227180121_add_status_edipi_other_unique_id_and_rej_reason_to_office_users_table.up.sql diff --git a/migrations/app/schema/20240227180121_add_status_edipi_other_unique_id_and_rej_reason_to_office_users_table.up.sql b/migrations/app/schema/20240227180121_add_status_edipi_other_unique_id_and_rej_reason_to_office_users_table.up.sql new file mode 100644 index 00000000000..628f26333d1 --- /dev/null +++ b/migrations/app/schema/20240227180121_add_status_edipi_other_unique_id_and_rej_reason_to_office_users_table.up.sql @@ -0,0 +1,19 @@ +CREATE TYPE office_user_status AS enum ( + 'APPROVED', + 'REQUESTED', + 'REJECTED' +); + +-- Adds new columns to office_users table +-- making status default of APPROVED to ensure past users using MM are already approved +ALTER TABLE office_users +ADD COLUMN IF NOT EXISTS status office_user_status DEFAULT 'APPROVED' NULL, +ADD COLUMN IF NOT EXISTS edipi TEXT UNIQUE DEFAULT NULL, +ADD COLUMN IF NOT EXISTS other_unique_id TEXT UNIQUE DEFAULT NULL, +ADD COLUMN IF NOT EXISTS rejection_reason TEXT DEFAULT NULL; + +-- Comments on new columns +COMMENT on COLUMN office_users.status IS 'Status of an office user account'; +COMMENT on COLUMN office_users.edipi IS 'DoD ID or EDIPI of office user'; +COMMENT on COLUMN office_users.other_unique_id IS 'Other unique id for PIV or ECA cert users'; +COMMENT on COLUMN office_users.rejection_reason IS 'Rejection reason when account request is rejected by an admin';