add status to user table

This commit is contained in:
Hongbo Wu 2022-07-19 21:25:58 +08:00 committed by Jackson Harper
parent 48676c0857
commit a97c3286bf
2 changed files with 22 additions and 0 deletions

View file

@ -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;

View file

@ -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;