Merge pull request #3106 from YevhenBondarenko/master

remove partitioning from relation in schema-entities.sql
This commit is contained in:
Igor Kulikov 2020-07-17 09:53:23 +03:00 committed by GitHub
commit 02ba47597e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -167,13 +167,14 @@ CREATE TABLE IF NOT EXISTS relation (
relation_type varchar(255),
additional_info varchar,
CONSTRAINT relation_pkey PRIMARY KEY (from_id, from_type, relation_type_group, relation_type, to_id, to_type)
) PARTITION BY LIST (relation_type_group);
CREATE TABLE other_relations PARTITION OF relation DEFAULT;
CREATE TABLE common_relations PARTITION OF relation FOR VALUES IN ('COMMON');
CREATE TABLE alarm_relations PARTITION OF relation FOR VALUES IN ('ALARM');
CREATE TABLE dashboard_relations PARTITION OF relation FOR VALUES IN ('DASHBOARD');
CREATE TABLE rule_relations PARTITION OF relation FOR VALUES IN ('RULE_CHAIN', 'RULE_NODE');
);
-- ) PARTITION BY LIST (relation_type_group);
--
-- CREATE TABLE other_relations PARTITION OF relation DEFAULT;
-- CREATE TABLE common_relations PARTITION OF relation FOR VALUES IN ('COMMON');
-- CREATE TABLE alarm_relations PARTITION OF relation FOR VALUES IN ('ALARM');
-- CREATE TABLE dashboard_relations PARTITION OF relation FOR VALUES IN ('DASHBOARD');
-- CREATE TABLE rule_relations PARTITION OF relation FOR VALUES IN ('RULE_CHAIN', 'RULE_NODE');
CREATE TABLE IF NOT EXISTS tb_user (
id uuid NOT NULL CONSTRAINT tb_user_pkey PRIMARY KEY,