2017-12-01 14:07:10 +01:00
|
|
|
-- Table: public.videos
|
2017-11-30 04:49:26 +01:00
|
|
|
|
2017-12-01 14:07:10 +01:00
|
|
|
-- DROP TABLE public.videos;
|
2017-11-30 04:49:26 +01:00
|
|
|
|
2017-12-01 14:07:10 +01:00
|
|
|
CREATE TABLE public.videos
|
2017-11-30 04:49:26 +01:00
|
|
|
(
|
|
|
|
last_updated timestamp with time zone,
|
|
|
|
video_id text COLLATE pg_catalog."default" NOT NULL,
|
|
|
|
video_info text COLLATE pg_catalog."default",
|
|
|
|
video_html text COLLATE pg_catalog."default",
|
|
|
|
views bigint,
|
|
|
|
likes integer,
|
|
|
|
dislikes integer,
|
|
|
|
rating double precision,
|
2017-12-30 22:44:09 +01:00
|
|
|
description text COLLATE pg_catalog."default",
|
2017-12-01 14:07:10 +01:00
|
|
|
CONSTRAINT videos_pkey PRIMARY KEY (video_id)
|
2017-11-30 04:49:26 +01:00
|
|
|
)
|
|
|
|
WITH (
|
|
|
|
OIDS = FALSE
|
|
|
|
)
|
|
|
|
TABLESPACE pg_default;
|
|
|
|
|
2017-12-01 14:07:10 +01:00
|
|
|
ALTER TABLE public.videos
|
2017-11-30 04:49:26 +01:00
|
|
|
OWNER to omar;
|
|
|
|
|
2017-12-01 14:07:10 +01:00
|
|
|
GRANT ALL ON TABLE public.videos TO kemal;
|
2017-11-30 04:49:26 +01:00
|
|
|
|
2017-12-01 14:07:10 +01:00
|
|
|
GRANT ALL ON TABLE public.videos TO omar;
|
2017-11-30 04:49:26 +01:00
|
|
|
|
2017-12-01 14:07:10 +01:00
|
|
|
-- Index: videos_video_id_idx
|
2017-11-30 04:49:26 +01:00
|
|
|
|
2017-12-01 14:07:10 +01:00
|
|
|
-- DROP INDEX public.videos_video_id_idx;
|
2017-11-30 04:49:26 +01:00
|
|
|
|
2017-12-01 14:07:10 +01:00
|
|
|
CREATE INDEX videos_video_id_idx
|
|
|
|
ON public.videos USING btree
|
2017-11-30 04:49:26 +01:00
|
|
|
(video_id COLLATE pg_catalog."default")
|
2017-12-30 22:44:09 +01:00
|
|
|
TABLESPACE pg_default;
|