summaryrefslogtreecommitdiffstats
path: root/config/sql/videos.sql
blob: 63a42e66e804a8ebe301323092d9d41375b6a959 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
-- Table: public.videos

-- DROP TABLE public.videos;

CREATE TABLE public.videos
(
    id text COLLATE pg_catalog."default" NOT NULL,
    info text COLLATE pg_catalog."default",
    updated timestamp with time zone,
    title text COLLATE pg_catalog."default",
    views bigint,
    likes integer,
    dislikes integer,
    wilson_score double precision,
    published timestamp with time zone,
    description text COLLATE pg_catalog."default",
    language text COLLATE pg_catalog."default",
    author text COLLATE pg_catalog."default",
    ucid text COLLATE pg_catalog."default",
    CONSTRAINT videos_pkey PRIMARY KEY (id)
)
WITH (
    OIDS = FALSE
)
TABLESPACE pg_default;

GRANT ALL ON TABLE public.videos TO kemal;

-- Index: id_idx

-- DROP INDEX public.id_idx;

CREATE UNIQUE INDEX id_idx
    ON public.videos USING btree
    (id COLLATE pg_catalog."default")
    TABLESPACE pg_default;