mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-29 08:44:11 +02:00
IcingaUser: remove obsolete states stub
This commit is contained in:
parent
47f20c93a3
commit
62c1aec917
@ -29,15 +29,8 @@ class IcingaUser extends IcingaObject
|
||||
'enable_notifications' => 'enable_notifications'
|
||||
);
|
||||
|
||||
protected $states = array();
|
||||
|
||||
protected function setStates($value)
|
||||
{
|
||||
$states = $value;
|
||||
sort($states);
|
||||
if ($this->states !== $states) {
|
||||
$this->states = $states;
|
||||
$this->hasBeenModified = true;
|
||||
}
|
||||
}
|
||||
protected $relatedSets = array(
|
||||
'states' => 'StateFilterSet',
|
||||
'types' => 'TypeFilterSet',
|
||||
);
|
||||
}
|
||||
|
28
schema/mysql-migrations/upgrade_76.sql
Normal file
28
schema/mysql-migrations/upgrade_76.sql
Normal file
@ -0,0 +1,28 @@
|
||||
DROP TABLE icinga_user_filters_set;
|
||||
|
||||
CREATE TABLE icinga_user_types_set (
|
||||
user_id INT(10) UNSIGNED NOT NULL,
|
||||
property ENUM(
|
||||
'DowntimeStart',
|
||||
'DowntimeEnd',
|
||||
'DowntimeRemoved',
|
||||
'Custom',
|
||||
'Acknowledgement',
|
||||
'Problem',
|
||||
'Recovery',
|
||||
'FlappingStart',
|
||||
'FlappingEnd'
|
||||
) NOT NULL,
|
||||
merge_behaviour ENUM('override', 'extend', 'blacklist') NOT NULL DEFAULT 'override'
|
||||
COMMENT 'override: = [], extend: += [], blacklist: -= []',
|
||||
PRIMARY KEY (user_id, property, merge_behaviour),
|
||||
CONSTRAINT icinga_user_types_set_user
|
||||
FOREIGN KEY icinga_user (user_id)
|
||||
REFERENCES icinga_user (id)
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
INSERT INTO director_schema_migration
|
||||
SET migration_time = NOW(),
|
||||
schema_version = 76;
|
@ -799,7 +799,7 @@ CREATE TABLE icinga_user_states_set (
|
||||
ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
CREATE TABLE icinga_user_filters_set (
|
||||
CREATE TABLE icinga_user_types_set (
|
||||
user_id INT(10) UNSIGNED NOT NULL,
|
||||
property ENUM(
|
||||
'DowntimeStart',
|
||||
@ -815,7 +815,7 @@ CREATE TABLE icinga_user_filters_set (
|
||||
merge_behaviour ENUM('override', 'extend', 'blacklist') NOT NULL DEFAULT 'override'
|
||||
COMMENT 'override: = [], extend: += [], blacklist: -= []',
|
||||
PRIMARY KEY (user_id, property, merge_behaviour),
|
||||
CONSTRAINT icinga_user_filters_set_user
|
||||
CONSTRAINT icinga_user_types_set_user
|
||||
FOREIGN KEY icinga_user (user_id)
|
||||
REFERENCES icinga_user (id)
|
||||
ON DELETE CASCADE
|
||||
@ -1112,4 +1112,4 @@ CREATE TABLE sync_run (
|
||||
|
||||
INSERT INTO director_schema_migration
|
||||
SET migration_time = NOW(),
|
||||
schema_version = 75;
|
||||
schema_version = 76;
|
||||
|
Loading…
x
Reference in New Issue
Block a user