users.sql 562 B

123456789101112131415161718192021222324252627282930
  1. -- Table: public.users
  2. -- DROP TABLE public.users;
  3. CREATE TABLE public.users
  4. (
  5. id text[] NOT NULL,
  6. updated timestamp with time zone,
  7. notifications text[],
  8. subscriptions text[],
  9. email text NOT NULL,
  10. preferences text,
  11. password text,
  12. token text,
  13. watched text[],
  14. CONSTRAINT users_email_key UNIQUE (email)
  15. );
  16. GRANT ALL ON TABLE public.users TO kemal;
  17. -- Index: public.email_unique_idx
  18. -- DROP INDEX public.email_unique_idx;
  19. CREATE UNIQUE INDEX email_unique_idx
  20. ON public.users
  21. USING btree
  22. (lower(email) COLLATE pg_catalog."default");