Skip to content

Commit

Permalink
Merge pull request #12114 from transcom/MAIN-B-18820-add-status-edipi…
Browse files Browse the repository at this point in the history
…-otheruniqueid-rej-reason-to-officeusers-table

MAIN B-18820 add status, edipi, otheruniqueid, rej reason, to office_users table
  • Loading branch information
deandreJones authored Feb 29, 2024
2 parents b0ac37e + 63b5b2e commit 6f1e2ee
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions migrations/app/migrations_manifest.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -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';

0 comments on commit 6f1e2ee

Please sign in to comment.