playlists.sql 491 B

123456789101112131415161718192021222324252627282930
  1. -- Type: public.privacy
  2. -- DROP TYPE public.privacy;
  3. CREATE TYPE public.privacy AS ENUM
  4. (
  5. 'Public',
  6. 'Unlisted',
  7. 'Private'
  8. );
  9. -- Table: public.playlists
  10. -- DROP TABLE public.playlists;
  11. CREATE TABLE IF NOT EXISTS public.playlists
  12. (
  13. title text,
  14. id text primary key,
  15. author text,
  16. description text,
  17. video_count integer,
  18. created timestamptz,
  19. updated timestamptz,
  20. privacy privacy,
  21. index int8[]
  22. );
  23. GRANT ALL ON public.playlists TO current_user;