Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add column environment_id to models related to the dependency feature #1116

Open
wants to merge 1 commit into
base: dependencies
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 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 $environment_id
* @property string $to_node_id
* @property string $from_node_id
* @property string $display_name
Expand All @@ -37,6 +38,7 @@ public function getKeyName(): array
public function getColumns(): array
{
return [
'environment_id',
'to_node_id',
'from_node_id',
'display_name',
Expand All @@ -47,6 +49,7 @@ public function getColumns(): array
public function createBehaviors(Behaviors $behaviors): void
{
$behaviors->add(new Binary([
'environment_id',
'to_node_id',
'from_node_id',
'dependency_edge_state_id'
Expand Down
5 changes: 4 additions & 1 deletion library/Icingadb/Model/DependencyEdgeState.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* Dependency edge state model.
*
* @property string $id
* @property string $environment_id
* @property bool $failed
*/
class DependencyEdgeState extends Model
Expand All @@ -28,6 +29,7 @@ public function getKeyName(): string
public function getColumns(): array
{
return [
'environment_id',
'failed'
];
}
Expand All @@ -42,7 +44,8 @@ public function getColumnDefinitions(): array
public function createBehaviors(Behaviors $behaviors): void
{
$behaviors->add(new Binary([
'id'
'id',
'environment_id'
]));
$behaviors->add(new BoolCast([
'failed'
Expand Down
3 changes: 3 additions & 0 deletions library/Icingadb/Model/DependencyNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* Dependency node model.
*
* @property string $id
* @property string $environment_id
* @property ?string $host_id
* @property ?string $service_id
* @property ?string $redundancy_group_id
Expand Down Expand Up @@ -46,6 +47,7 @@ public function getColumns(): array
{
return [
'id',
'environment_id',
'host_id',
'service_id',
'redundancy_group_id',
Expand Down Expand Up @@ -85,6 +87,7 @@ public function createBehaviors(Behaviors $behaviors): void
{
$behaviors->add(new Binary([
'id',
'environment_id',
'host_id',
'service_id',
'redundancy_group_id'
Expand Down
5 changes: 4 additions & 1 deletion library/Icingadb/Model/RedundancyGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* Redundancy group model.
*
* @property string $id
* @property string $environment_id
* @property string $display_name
*
* @property (?RedundancyGroupState)|Query $state
Expand All @@ -37,6 +38,7 @@ public function getKeyName(): string
public function getColumns(): array
{
return [
'environment_id',
'display_name'
];
}
Expand All @@ -51,7 +53,8 @@ public function getColumnDefinitions(): array
public function createBehaviors(Behaviors $behaviors): void
{
$behaviors->add(new Binary([
'id'
'id',
'environment_id'
]));
$behaviors->add(new ReRoute([
'child' => 'to.from',
Expand Down
3 changes: 3 additions & 0 deletions library/Icingadb/Model/RedundancyGroupState.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* Redundancy group state model.
*
* @property string $id
* @property string $environment_id
* @property string $redundancy_group_id
* @property bool $failed
* @property DateTime $last_state_change
Expand All @@ -38,6 +39,7 @@ public function getKeyName(): string
public function getColumns(): array
{
return [
'environment_id',
'redundancy_group_id',
'failed',
'last_state_change'
Expand All @@ -48,6 +50,7 @@ public function createBehaviors(Behaviors $behaviors): void
{
$behaviors->add(new Binary([
'id',
'environment_id',
'redundancy_group_id'
]));
$behaviors->add(new BoolCast([
Expand Down
Loading