This commit is contained in:
alejandro.campos@artica.es 2024-02-21 10:11:37 +01:00
parent 1991b74b9b
commit 7773967c71
3 changed files with 10 additions and 13 deletions

View File

@ -1,5 +1,14 @@
START TRANSACTION;
-- Watch out! The following field migration must be done before altering the corresponding table.
UPDATE `tevent_filter`
SET `search` = `regex`,
`regex` = '1'
WHERE `regex` IS NOT NULL AND `regex` != '';
-- Watch out! The following alter command must be done after the previous update of this table.
ALTER TABLE `tevent_filter` MODIFY COLUMN `regex` TINYINT unsigned NOT NULL DEFAULT 0;
CREATE TABLE IF NOT EXISTS `tmerge_error` (
`id` int(10) NOT NULL auto_increment,
`id_node` int(10) default 0,

View File

@ -1,12 +0,0 @@
START TRANSACTION;
-- Watch out! The following field migration must be done before altering the corresponding table.
UPDATE `tevent_filter`
SET `search` = `regex`,
`regex` = '1'
WHERE `regex` IS NOT NULL AND `regex` != '';
-- Watch out! The following alter command must be done after the previous update of this table.
ALTER TABLE `tevent_filter` MODIFY COLUMN `regex` TINYINT unsigned NOT NULL DEFAULT 0;
COMMIT;

View File

@ -1185,7 +1185,7 @@ function events_get_all(
$comp_pattern = 'LIKE lower("%%%s%%")';
// Disregard repeated whitespaces in search (customer requirement).
// Apply in both column stored value and search term.
// Conversion must be applied in both column stored value and search term.
$search_term = preg_replace('/( )+/', ' ', $filter['search']);
$search_column_pattern = 'REGEXP_REPLACE(%s, "( \\s*)+", " ")';
}