diff --git a/packages/db/migrations/0088.do.add_status_to_user.sql b/packages/db/migrations/0088.do.add_status_to_user.sql new file mode 100755 index 000000000..ba0416fb8 --- /dev/null +++ b/packages/db/migrations/0088.do.add_status_to_user.sql @@ -0,0 +1,11 @@ +-- Type: DO +-- Name: add_status_to_user +-- Description: Add status to user table + +BEGIN; + +CREATE TYPE user_status_type AS ENUM ('ACTIVE', 'PENDING'); + +ALTER TABLE omnivore.user ADD COLUMN status user_status_type NOT NULL DEFAULT 'ACTIVE'; + +COMMIT; diff --git a/packages/db/migrations/0088.undo.add_status_to_user.sql b/packages/db/migrations/0088.undo.add_status_to_user.sql new file mode 100755 index 000000000..182e1aef0 --- /dev/null +++ b/packages/db/migrations/0088.undo.add_status_to_user.sql @@ -0,0 +1,11 @@ +-- Type: UNDO +-- Name: add_status_to_user +-- Description: Add status to user table + +BEGIN; + +DROP TYPE IF EXISTS user_status_type CASCADE; + +ALTER TABLE omnivore.user DROP COLUMN IF EXISTS status; + +COMMIT;