Skip to content

Commit

Permalink
DependencyEdge: Add column id and make it the pk
Browse files Browse the repository at this point in the history
  • Loading branch information
nilmerg committed Jan 15, 2025
1 parent dd74439 commit 8e5a816
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions library/Icingadb/Model/DependencyEdge.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
/**
* Dependency edge model.
*
* @property string $id
* @property string $environment_id
* @property string $to_node_id
* @property string $from_node_id
Expand All @@ -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
Expand All @@ -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',
Expand Down

0 comments on commit 8e5a816

Please sign in to comment.