diff options
| author | Omar Roth <omarroth@hotmail.com> | 2019-02-11 10:59:17 -0600 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2019-02-11 10:59:17 -0600 |
| commit | 52cad8d6daa95a1fdf9d2f3cb44c72b14b4a5520 (patch) | |
| tree | d2633231b3ff78b183cdaa66a30ab4dc466e0b27 /config/sql | |
| parent | 1590393fcc461e8279bbca75162d5f6af0fc5b0b (diff) | |
| download | invidious-52cad8d6daa95a1fdf9d2f3cb44c72b14b4a5520.tar.gz invidious-52cad8d6daa95a1fdf9d2f3cb44c72b14b4a5520.tar.bz2 invidious-52cad8d6daa95a1fdf9d2f3cb44c72b14b4a5520.zip | |
Update change index for channel_videos and add index for nonces
Diffstat (limited to 'config/sql')
| -rw-r--r-- | config/sql/channel_videos.sql | 2 | ||||
| -rw-r--r-- | config/sql/nonces.sql | 18 |
2 files changed, 14 insertions, 6 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"); + |
