generated from ctc-uci/npo-template-merged
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
4 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,12 @@ | ||
-- Table: public.users | ||
|
||
-- DROP TABLE IF EXISTS public.users; | ||
|
||
CREATE TABLE IF NOT EXISTS public.users | ||
( | ||
id integer NOT NULL GENERATED ALWAYS AS IDENTITY ( INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 2147483647 CACHE 1 ), | ||
email character varying(256) COLLATE pg_catalog."default" NOT NULL, | ||
firebase_uid character varying(128) COLLATE pg_catalog."default" NOT NULL, | ||
role character varying(16) COLLATE pg_catalog."default" NOT NULL DEFAULT 'user'::character varying, | ||
first_name character varying(256) COLLATE pg_catalog."default" NOT NULL, | ||
last_name character varying(256) COLLATE pg_catalog."default" NOT NULL, | ||
edit_perms boolean NOT NULL DEFAULT false, | ||
CONSTRAINT user_pkey PRIMARY KEY (id), | ||
CONSTRAINT email UNIQUE (email), | ||
CONSTRAINT firebase_uid UNIQUE (firebase_uid), | ||
CONSTRAINT role_check CHECK (role::text = ANY (ARRAY['user'::character varying, 'admin'::character varying]::text[])) | ||
CONSTRAINT firebase_uid UNIQUE (firebase_uid) | ||
) | ||
|
||
TABLESPACE pg_default; | ||
|
||
ALTER TABLE IF EXISTS public.users | ||
OWNER to postgres; |