Commit 35bee028 authored by Kevin Duret's avatar Kevin Duret Committed by Kevin Duret

enh(database): add index in ws_token table to improve performance (#6107)

Refs: #6056
parent a63cc10a
......@@ -2291,6 +2291,7 @@ CREATE TABLE ws_token (
token VARCHAR(100) NOT NULL,
generate_date DATETIME NOT NULL,
UNIQUE (token),
KEY `index1` (`generate_date`),
FOREIGN KEY (contact_id) REFERENCES contact (contact_id) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
......
-- Change version of Centreon
UPDATE `informations` SET `value` = '2.8.19' WHERE CONVERT( `informations`.`key` USING utf8 ) = 'version' AND CONVERT ( `informations`.`value` USING utf8 ) = '2.8.18' LIMIT 1;
-- Add index to ws_token
ALTER TABLE `ws_token` ADD INDEX `index1` (`generate_date`);
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment