diff options
| author | Andre Borie <hi@rjevski.io> | 2021-01-17 01:44:31 +0000 |
|---|---|---|
| committer | Andre Borie <hi@rjevski.io> | 2021-01-17 14:20:34 +0000 |
| commit | ffa9e5dfab7a1d7ea84d88007107f9f40295c50a (patch) | |
| tree | 5dac9a812f2b1001d1e7d13680979dd95680caa0 /config/sql/videos.sql | |
| parent | c7e65ce795df7858ed1cdb161e3c40165f80e0ac (diff) | |
| download | invidious-ffa9e5dfab7a1d7ea84d88007107f9f40295c50a.tar.gz invidious-ffa9e5dfab7a1d7ea84d88007107f9f40295c50a.tar.bz2 invidious-ffa9e5dfab7a1d7ea84d88007107f9f40295c50a.zip | |
Make migrations (mostly) idempotent.
Diffstat (limited to 'config/sql/videos.sql')
| -rw-r--r-- | config/sql/videos.sql | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/config/sql/videos.sql b/config/sql/videos.sql index 8def2f83..7040703c 100644 --- a/config/sql/videos.sql +++ b/config/sql/videos.sql @@ -2,7 +2,7 @@ -- DROP TABLE public.videos; -CREATE TABLE public.videos +CREATE TABLE IF NOT EXISTS public.videos ( id text NOT NULL, info text, @@ -10,13 +10,13 @@ CREATE TABLE public.videos CONSTRAINT videos_pkey PRIMARY KEY (id) ); -GRANT ALL ON TABLE public.videos TO kemal; +GRANT ALL ON TABLE public.videos TO current_user; -- Index: public.id_idx -- DROP INDEX public.id_idx; -CREATE UNIQUE INDEX id_idx +CREATE UNIQUE INDEX IF NOT EXISTS id_idx ON public.videos USING btree (id COLLATE pg_catalog."default"); |
