From e570d8a1e5f1303fcbf15f2d23977ce24549a959 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Wed, 15 Jan 2025 10:31:55 +0100 Subject: [PATCH] DependencyEdge: Add column `id` and make it the pk --- library/Icingadb/Model/DependencyEdge.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/library/Icingadb/Model/DependencyEdge.php b/library/Icingadb/Model/DependencyEdge.php index c29b605d3..0655df7b7 100644 --- a/library/Icingadb/Model/DependencyEdge.php +++ b/library/Icingadb/Model/DependencyEdge.php @@ -13,6 +13,7 @@ /** * Dependency edge model. * + * @property string $id * @property string $environment_id * @property string $to_node_id * @property string $from_node_id @@ -30,9 +31,9 @@ public function getTableName(): string return 'dependency_edge'; } - public function getKeyName(): array + public function getKeyName(): string { - return ['to_node_id', 'from_node_id']; + return 'id'; } public function getColumns(): array @@ -49,6 +50,7 @@ public function getColumns(): array public function createBehaviors(Behaviors $behaviors): void { $behaviors->add(new Binary([ + 'id', 'environment_id', 'to_node_id', 'from_node_id',