33 lines
968 B
MySQL
33 lines
968 B
MySQL
|
|
||
|
CREATE TABLE IF NOT EXISTS api.tag_vod_relations
|
||
|
(
|
||
|
id integer NOT NULL,
|
||
|
votes integer,
|
||
|
creator_id integer,
|
||
|
created_at timestamp(6) without time zone,
|
||
|
updated_at timestamp(6) without time zone,
|
||
|
created_by_id integer,
|
||
|
updated_by_id integer,
|
||
|
CONSTRAINT tag_vod_relations_pkey PRIMARY KEY (id)
|
||
|
)
|
||
|
|
||
|
TABLESPACE pg_default;
|
||
|
|
||
|
ALTER TABLE IF EXISTS api.tag_vod_relations
|
||
|
OWNER to postgres;
|
||
|
-- Index: tag_vod_relations_created_by_id_fk
|
||
|
|
||
|
-- DROP INDEX IF EXISTS api.tag_vod_relations_created_by_id_fk;
|
||
|
|
||
|
CREATE INDEX IF NOT EXISTS tag_vod_relations_created_by_id_fk
|
||
|
ON api.tag_vod_relations USING btree
|
||
|
(created_by_id ASC NULLS LAST)
|
||
|
TABLESPACE pg_default;
|
||
|
-- Index: tag_vod_relations_updated_by_id_fk
|
||
|
|
||
|
-- DROP INDEX IF EXISTS api.tag_vod_relations_updated_by_id_fk;
|
||
|
|
||
|
CREATE INDEX IF NOT EXISTS tag_vod_relations_updated_by_id_fk
|
||
|
ON api.tag_vod_relations USING btree
|
||
|
(updated_by_id ASC NULLS LAST)
|
||
|
TABLESPACE pg_default;
|