summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/Pg-database.sql3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/Pg-database.sql b/sql/Pg-database.sql
index 29adb6b8..22e87fca 100644
--- a/sql/Pg-database.sql
+++ b/sql/Pg-database.sql
@@ -39,7 +39,8 @@ SELECT setval('entity_class_id_seq',7);
CREATE TABLE entity_class_to_entity (
entity_class_id integer not null references entity_class(id),
- entity_id integer not null references entity(id)
+ entity_id integer not null references entity(id),
+ PRIMARY KEY(entity_class_id,entity_id)
);
COMMENT ON TABLE entity_class_to_entity IS $$ Relation builder for classes to entity $$;