diff options
| author | Omar Roth <omarroth@hotmail.com> | 2018-11-02 09:46:45 -0500 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2018-11-02 09:46:45 -0500 |
| commit | 19632511d5ed1a38c32929d5dcb01edcd014e291 (patch) | |
| tree | a689a0559bcc8f54647024d3d64118ea6c0dbf99 /config/sql/users.sql | |
| parent | d739ef8fd340149a0b1a2371ffd419c9723ce4f4 (diff) | |
| download | invidious-19632511d5ed1a38c32929d5dcb01edcd014e291.tar.gz invidious-19632511d5ed1a38c32929d5dcb01edcd014e291.tar.bz2 invidious-19632511d5ed1a38c32929d5dcb01edcd014e291.zip | |
Update SQL
Diffstat (limited to 'config/sql/users.sql')
| -rw-r--r-- | config/sql/users.sql | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/config/sql/users.sql b/config/sql/users.sql index 7f452e4c..f806271c 100644 --- a/config/sql/users.sql +++ b/config/sql/users.sql @@ -2,22 +2,28 @@ -- DROP TABLE public.users; -CREATE TABLE public.users +CREATE TABLE public.users ( - id text[] COLLATE pg_catalog."default" NOT NULL, - updated timestamp with time zone, - notifications text[] COLLATE pg_catalog."default", - subscriptions text[] COLLATE pg_catalog."default", - email text COLLATE pg_catalog."default" NOT NULL, - preferences text COLLATE pg_catalog."default", - password text COLLATE pg_catalog."default", - token text COLLATE pg_catalog."default", - watched text[] COLLATE pg_catalog."default", - CONSTRAINT users_email_key UNIQUE (email) -) -WITH ( - OIDS = FALSE -) -TABLESPACE pg_default; + id text[] NOT NULL, + updated timestamp with time zone, + notifications text[], + subscriptions text[], + email text NOT NULL, + preferences text, + password text, + token text, + watched text[], + CONSTRAINT users_email_key UNIQUE (email) +); GRANT ALL ON TABLE public.users TO kemal; + +-- Index: public.email_unique_idx + +-- DROP INDEX public.email_unique_idx; + +CREATE UNIQUE INDEX email_unique_idx + ON public.users + USING btree + (lower(email) COLLATE pg_catalog."default"); + |
