channels.sql 520 B

1234567891011121314151617181920212223242526
  1. -- Table: public.channels
  2. -- DROP TABLE public.channels;
  3. CREATE TABLE IF NOT EXISTS public.channels
  4. (
  5. id text NOT NULL,
  6. author text,
  7. updated timestamp with time zone,
  8. deleted boolean,
  9. subscribed timestamp with time zone,
  10. CONSTRAINT channels_id_key UNIQUE (id)
  11. );
  12. GRANT ALL ON TABLE public.channels TO current_user;
  13. -- Index: public.channels_id_idx
  14. -- DROP INDEX public.channels_id_idx;
  15. CREATE INDEX IF NOT EXISTS channels_id_idx
  16. ON public.channels
  17. USING btree
  18. (id COLLATE pg_catalog."default");