From b7d7d73b9a2e6794dde0a6a50085560f3400cb73 Mon Sep 17 00:00:00 2001 From: "Barbesange, Jason" Date: Tue, 21 Nov 2023 10:16:54 +0100 Subject: [PATCH] modify migration files --- .../group_notification.php | 15 +++------------ install/mysql/glpi-empty.sql | 9 ++++++--- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/install/migrations/update_10.0.x_to_10.1.0/group_notification.php b/install/migrations/update_10.0.x_to_10.1.0/group_notification.php index 38dcb4f0b7f..6892341693d 100644 --- a/install/migrations/update_10.0.x_to_10.1.0/group_notification.php +++ b/install/migrations/update_10.0.x_to_10.1.0/group_notification.php @@ -45,10 +45,7 @@ $migration->addField( $table, $field_to_add, - 'tinyint', - [ - 'value' => 0, - ] + "tinyint NOT NULL DEFAULT '0'" ); $migration->addKey($table, $field_to_add); } @@ -59,10 +56,7 @@ $migration->addField( $table, $field_to_add, - 'tinyint', - [ - 'value' => 0, - ] + "tinyint NOT NULL DEFAULT '0'" ); $migration->addKey($table, $field_to_add); } @@ -73,10 +67,7 @@ $migration->addField( $table, $field_to_add, - 'tinyint', - [ - 'value' => 0, - ] + "tinyint NOT NULL DEFAULT '0'" ); $migration->addKey($table, $field_to_add); } diff --git a/install/mysql/glpi-empty.sql b/install/mysql/glpi-empty.sql index 4de3cb3542a..d026aebafc6 100644 --- a/install/mysql/glpi-empty.sql +++ b/install/mysql/glpi-empty.sql @@ -713,7 +713,8 @@ CREATE TABLE `glpi_changes_groups` ( `use_notification` tinyint NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `unicity` (`changes_id`,`type`,`groups_id`), - KEY `group` (`groups_id`,`type`) + KEY `group` (`groups_id`,`type`), + KEY `use_notification` (`use_notification`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; @@ -3079,7 +3080,8 @@ CREATE TABLE `glpi_groups_problems` ( `use_notification` tinyint NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `unicity` (`problems_id`,`type`,`groups_id`), - KEY `group` (`groups_id`,`type`) + KEY `group` (`groups_id`,`type`), + KEY `use_notification` (`use_notification`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; @@ -3130,7 +3132,8 @@ CREATE TABLE `glpi_groups_tickets` ( `use_notification` tinyint NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `unicity` (`tickets_id`,`type`,`groups_id`), - KEY `group` (`groups_id`,`type`) + KEY `group` (`groups_id`,`type`), + KEY `use_notification` (`use_notification`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;