From b22af65f932ab5ad5e7a39b28d4b7073bf8649bd Mon Sep 17 00:00:00 2001 From: Hongbo Wu Date: Thu, 29 Aug 2024 11:54:02 +0800 Subject: [PATCH] add archived status to user account --- packages/api/src/entity/user.ts | 1 + .../migrations/0188.do.add_archived_status_to_user.sql | 9 +++++++++ .../migrations/0188.undo.add_archived_status_to_user.sql | 9 +++++++++ 3 files changed, 19 insertions(+) create mode 100755 packages/db/migrations/0188.do.add_archived_status_to_user.sql create mode 100755 packages/db/migrations/0188.undo.add_archived_status_to_user.sql diff --git a/packages/api/src/entity/user.ts b/packages/api/src/entity/user.ts index 0df30e6ac..fac2f45da 100644 --- a/packages/api/src/entity/user.ts +++ b/packages/api/src/entity/user.ts @@ -23,6 +23,7 @@ export enum StatusType { Active = 'ACTIVE', Pending = 'PENDING', Deleted = 'DELETED', + Archived = 'ARCHIVED', } @Entity() diff --git a/packages/db/migrations/0188.do.add_archived_status_to_user.sql b/packages/db/migrations/0188.do.add_archived_status_to_user.sql new file mode 100755 index 000000000..9d653344c --- /dev/null +++ b/packages/db/migrations/0188.do.add_archived_status_to_user.sql @@ -0,0 +1,9 @@ +-- Type: DO +-- Name: add_archived_status_to_user +-- Description: Add ARCHIVED status to the user table + +BEGIN; + +ALTER TYPE user_status_type ADD VALUE 'ARCHIVED'; + +COMMIT; diff --git a/packages/db/migrations/0188.undo.add_archived_status_to_user.sql b/packages/db/migrations/0188.undo.add_archived_status_to_user.sql new file mode 100755 index 000000000..e0bd8947b --- /dev/null +++ b/packages/db/migrations/0188.undo.add_archived_status_to_user.sql @@ -0,0 +1,9 @@ +-- Type: UNDO +-- Name: add_archived_status_to_user +-- Description: Add ARCHIVED status to the user table + +BEGIN; + +ALTER TYPE user_status_type DROP VALUE IF EXISTS 'ARCHIVED'; + +COMMIT;