Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
fix(sql): create feature table in 2.8.25 upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
kduret committed Jul 10, 2018
1 parent 2e00d0b commit 2fabc96
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
10 changes: 0 additions & 10 deletions www/install/sql/centreon/Update-DB-2.8.22_to_2.8.23.sql
Original file line number Diff line number Diff line change
@@ -1,12 +1,2 @@
-- Change version of Centreon
UPDATE `informations` SET `value` = '2.8.23' WHERE CONVERT( `informations`.`key` USING utf8 ) = 'version' AND CONVERT ( `informations`.`value` USING utf8 ) = '2.8.22' LIMIT 1;

-- Manage new feature proposal
CREATE TABLE IF NOT EXISTS contact_feature (
contact_id INT NOT NULL,
feature VARCHAR(255) NOT NULL,
feature_version VARCHAR(50) NOT NULL,
feature_enabled TINYINT DEFAULT 0,
PRIMARY KEY (contact_id, feature, feature_version),
FOREIGN KEY (contact_id) REFERENCES contact (contact_id) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
12 changes: 11 additions & 1 deletion www/install/sql/centreon/Update-DB-2.8.24_to_2.8.25.sql
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
-- Change version of Centreon
UPDATE `informations` SET `value` = '2.8.25' WHERE CONVERT( `informations`.`key` USING utf8 ) = 'version' AND CONVERT ( `informations`.`value` USING utf8 ) = '2.8.24' LIMIT 1;
UPDATE `informations` SET `value` = '2.8.25' WHERE CONVERT( `informations`.`key` USING utf8 ) = 'version' AND CONVERT ( `informations`.`value` USING utf8 ) = '2.8.24' LIMIT 1;

-- Manage new feature proposal
CREATE TABLE IF NOT EXISTS contact_feature (
contact_id INT NOT NULL,
feature VARCHAR(255) NOT NULL,
feature_version VARCHAR(50) NOT NULL,
feature_enabled TINYINT DEFAULT 0,
PRIMARY KEY (contact_id, feature, feature_version),
FOREIGN KEY (contact_id) REFERENCES contact (contact_id) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

0 comments on commit 2fabc96

Please sign in to comment.