users.sql 604 B

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