---
DROP TABLE IF EXISTS relations;
---
CREATE TABLE IF NOT EXISTS relations(
   id BIGSERIAL PRIMARY KEY,
   relation_role BIGINT NOT NULL,
   from_entity BIGINT NOT NULL,
   to_entity BIGINT NOT NULL,
   FOREIGN KEY(relation_role) REFERENCES relation_roles(id),
   FOREIGN KEY(to_entity) REFERENCES entities(id),
   FOREIGN KEY(from_entity) REFERENCES entities(id));
