mirror of
https://github.com/iv-org/invidious.git
synced 2025-05-02 14:36:23 -04:00
Make migrations (mostly) idempotent.
This commit is contained in:
parent
c7e65ce795
commit
ffa9e5dfab
10 changed files with 33 additions and 33 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
-- DROP TABLE public.users;
|
||||
|
||||
CREATE TABLE public.users
|
||||
CREATE TABLE IF NOT EXISTS public.users
|
||||
(
|
||||
updated timestamp with time zone,
|
||||
notifications text[],
|
||||
|
@ -16,13 +16,13 @@ CREATE TABLE public.users
|
|||
CONSTRAINT users_email_key UNIQUE (email)
|
||||
);
|
||||
|
||||
GRANT ALL ON TABLE public.users TO kemal;
|
||||
GRANT ALL ON TABLE public.users TO current_user;
|
||||
|
||||
-- Index: public.email_unique_idx
|
||||
|
||||
-- DROP INDEX public.email_unique_idx;
|
||||
|
||||
CREATE UNIQUE INDEX email_unique_idx
|
||||
CREATE UNIQUE INDEX IF NOT EXISTS email_unique_idx
|
||||
ON public.users
|
||||
USING btree
|
||||
(lower(email) COLLATE pg_catalog."default");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue