Skip to content

Commit 8e5a816

Browse files
committed
DependencyEdge: Add column id and make it the pk
1 parent dd74439 commit 8e5a816

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

library/Icingadb/Model/DependencyEdge.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
/**
1414
* Dependency edge model.
1515
*
16+
* @property string $id
1617
* @property string $environment_id
1718
* @property string $to_node_id
1819
* @property string $from_node_id
@@ -30,9 +31,9 @@ public function getTableName(): string
3031
return 'dependency_edge';
3132
}
3233

33-
public function getKeyName(): array
34+
public function getKeyName(): string
3435
{
35-
return ['to_node_id', 'from_node_id'];
36+
return 'id';
3637
}
3738

3839
public function getColumns(): array
@@ -49,6 +50,7 @@ public function getColumns(): array
4950
public function createBehaviors(Behaviors $behaviors): void
5051
{
5152
$behaviors->add(new Binary([
53+
'id',
5254
'environment_id',
5355
'to_node_id',
5456
'from_node_id',

0 commit comments

Comments
 (0)