diff options
Diffstat (limited to 'config/sql')
| -rw-r--r-- | config/sql/channel_videos.sql | 2 | ||||
| -rw-r--r-- | config/sql/nonces.sql | 18 | ||||
| -rw-r--r-- | config/sql/session_ids.sql | 23 | ||||
| -rw-r--r-- | config/sql/users.sql | 1 |
4 files changed, 37 insertions, 7 deletions
diff --git a/config/sql/channel_videos.sql b/config/sql/channel_videos.sql index 98567780..279fad29 100644 --- a/config/sql/channel_videos.sql +++ b/config/sql/channel_videos.sql @@ -31,6 +31,6 @@ CREATE INDEX channel_videos_published_idx CREATE INDEX channel_videos_ucid_idx ON public.channel_videos - USING hash + USING btree (ucid COLLATE pg_catalog."default"); diff --git a/config/sql/nonces.sql b/config/sql/nonces.sql index d2ec5be6..7b8ce9f2 100644 --- a/config/sql/nonces.sql +++ b/config/sql/nonces.sql @@ -5,10 +5,18 @@ CREATE TABLE public.nonces ( nonce text, - expire timestamp with time zone -) -WITH ( - OIDS=FALSE + expire timestamp with time zone, + CONSTRAINT nonces_id_key UNIQUE (nonce) ); -GRANT ALL ON TABLE public.nonces TO kemal;
\ No newline at end of file +GRANT ALL ON TABLE public.nonces TO kemal; + +-- Index: public.nonces_nonce_idx + +-- DROP INDEX public.nonces_nonce_idx; + +CREATE INDEX nonces_nonce_idx + ON public.nonces + USING btree + (nonce COLLATE pg_catalog."default"); + diff --git a/config/sql/session_ids.sql b/config/sql/session_ids.sql new file mode 100644 index 00000000..afbabb67 --- /dev/null +++ b/config/sql/session_ids.sql @@ -0,0 +1,23 @@ +-- Table: public.session_ids + +-- DROP TABLE public.session_ids; + +CREATE TABLE public.session_ids +( + id text NOT NULL, + email text, + issued timestamp with time zone, + CONSTRAINT session_ids_pkey PRIMARY KEY (id) +); + +GRANT ALL ON TABLE public.session_ids TO kemal; + +-- Index: public.session_ids_id_idx + +-- DROP INDEX public.session_ids_id_idx; + +CREATE INDEX session_ids_id_idx + ON public.session_ids + USING btree + (id COLLATE pg_catalog."default"); + diff --git a/config/sql/users.sql b/config/sql/users.sql index f806271c..536508a4 100644 --- a/config/sql/users.sql +++ b/config/sql/users.sql @@ -4,7 +4,6 @@ CREATE TABLE public.users ( - id text[] NOT NULL, updated timestamp with time zone, notifications text[], subscriptions text[], |
