From d33b4a3a2bf25888bf16d1ebf3e487bd179cb4e9 Mon Sep 17 00:00:00 2001 From: morgan Date: Thu, 25 Apr 2024 14:55:04 +0200 Subject: [PATCH 01/16] Remove doctrine command execution --- .../UpgradeTools/CoreUpgrader/CoreUpgrader17.php | 10 ---------- .../UpgradeTools/CoreUpgrader/CoreUpgrader80.php | 10 ---------- classes/UpgradeTools/SymfonyAdapter.php | 16 ---------------- 3 files changed, 36 deletions(-) diff --git a/classes/UpgradeTools/CoreUpgrader/CoreUpgrader17.php b/classes/UpgradeTools/CoreUpgrader/CoreUpgrader17.php index 56bef5e6b..3b075e0b5 100644 --- a/classes/UpgradeTools/CoreUpgrader/CoreUpgrader17.php +++ b/classes/UpgradeTools/CoreUpgrader/CoreUpgrader17.php @@ -56,16 +56,6 @@ protected function initConstants() $this->container->getSymfonyAdapter()->initKernel(); } - protected function upgradeDb($oldversion) - { - parent::upgradeDb($oldversion); - - $commandResult = $this->container->getSymfonyAdapter()->runSchemaUpgradeCommand(); - if (0 !== $commandResult['exitCode']) { - throw (new UpgradeException($this->container->getTranslator()->trans('Error upgrading Doctrine schema', [], 'Modules.Autoupgrade.Admin')))->setQuickInfos(explode("\n", $commandResult['output'])); - } - } - protected function upgradeLanguage($lang) { $isoCode = $lang['iso_code']; diff --git a/classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php b/classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php index 206b5c5d8..bad123d69 100644 --- a/classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php +++ b/classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php @@ -61,16 +61,6 @@ protected function forceRemovingFiles() } } - protected function upgradeDb($oldversion) - { - parent::upgradeDb($oldversion); - - $commandResult = $this->container->getSymfonyAdapter()->runSchemaUpgradeCommand(); - if (0 !== $commandResult['exitCode']) { - throw (new UpgradeException($this->container->getTranslator()->trans('Error upgrading Doctrine schema', [], 'Modules.Autoupgrade.Admin')))->setQuickInfos(explode("\n", $commandResult['output'])); - } - } - protected function upgradeLanguage($lang) { $isoCode = $lang['iso_code']; diff --git a/classes/UpgradeTools/SymfonyAdapter.php b/classes/UpgradeTools/SymfonyAdapter.php index fa24018f9..39af9fbc1 100644 --- a/classes/UpgradeTools/SymfonyAdapter.php +++ b/classes/UpgradeTools/SymfonyAdapter.php @@ -44,22 +44,6 @@ public function __construct($destinationPsVersion) $this->destinationPsVersion = $destinationPsVersion; } - public function runSchemaUpgradeCommand() - { - if (version_compare($this->destinationPsVersion, '1.7.1.1', '>=')) { - $schemaUpgrade = new \PrestaShopBundle\Service\Database\Upgrade(); - $outputCommand = 'prestashop:schema:update-without-foreign'; - } else { - $schemaUpgrade = new \PrestaShopBundle\Service\Cache\Refresh(); - $outputCommand = 'doctrine:schema:update'; - } - - $schemaUpgrade->addDoctrineSchemaUpdate(); - $output = $schemaUpgrade->execute(); - - return $output[$outputCommand]; - } - /** * Return the appropriate kernel if abstract or not. * From a29ff44e7e3bcda71c4cbe59811bea548b51a58b Mon Sep 17 00:00:00 2001 From: morgan Date: Thu, 25 Apr 2024 16:16:13 +0200 Subject: [PATCH 02/16] Add 1.7.1.1 and 1.7.2.0 queries --- upgrade/sql/1.7.1.1.sql | 16 +++++++++++++++- upgrade/sql/1.7.2.0.sql | 9 ++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/upgrade/sql/1.7.1.1.sql b/upgrade/sql/1.7.1.1.sql index a0c5e9992..d627fbee7 100644 --- a/upgrade/sql/1.7.1.1.sql +++ b/upgrade/sql/1.7.1.1.sql @@ -1,3 +1,17 @@ SET NAMES 'utf8'; -ALTER TABLE `PREFIX_address` CHANGE `company` `company` VARCHAR(255) DEFAULT NULL; \ No newline at end of file +ALTER TABLE `PREFIX_address` CHANGE `company` `company` VARCHAR(255) DEFAULT NULL; + +ALTER TABLE `PREFIX_attribute` DROP FOREIGN KEY FK_6C3355F967A664FB; +ALTER TABLE `PREFIX_attribute_group_lang` DROP FOREIGN KEY FK_4653726C67A664FB; +ALTER TABLE `PREFIX_attribute_group_shop` DROP FOREIGN KEY FK_DB30BAAC274A50A0; +ALTER TABLE `PREFIX_attribute_group_shop` DROP FOREIGN KEY FK_DB30BAAC67A664FB; +ALTER TABLE `PREFIX_attribute_lang` DROP FOREIGN KEY FK_3ABE46A77A4F53DC; +ALTER TABLE `PREFIX_attribute_shop` DROP FOREIGN KEY FK_A7DD8E67274A50A0; +ALTER TABLE `PREFIX_attribute_shop` DROP FOREIGN KEY FK_A7DD8E677A4F53DC; +ALTER TABLE `PREFIX_lang_shop` DROP FOREIGN KEY FK_2F43BFC7274A50A0; +ALTER TABLE `PREFIX_lang_shop` DROP FOREIGN KEY FK_2F43BFC7BA299860; +ALTER TABLE `PREFIX_shop` DROP FOREIGN KEY FK_CBDFBB9EF5C9E40; +ALTER TABLE `PREFIX_tab_lang` DROP FOREIGN KEY FK_CFD9262DED47AB56; +ALTER TABLE `PREFIX_translation` DROP FOREIGN KEY FK_ADEBEB36BA299860; +ALTER TABLE `PREFIX_tab` CHANGE icon icon VARCHAR(32) DEFAULT NULL; diff --git a/upgrade/sql/1.7.2.0.sql b/upgrade/sql/1.7.2.0.sql index 95c28b646..f49b6ceec 100644 --- a/upgrade/sql/1.7.2.0.sql +++ b/upgrade/sql/1.7.2.0.sql @@ -30,7 +30,14 @@ ALTER TABLE `PREFIX_supply_order_detail` CHANGE `isbn` `isbn` VARCHAR(32) NULL D ALTER TABLE `PREFIX_stock_available` ADD `physical_quantity` INT NOT NULL DEFAULT '0' AFTER `quantity`; ALTER TABLE `PREFIX_stock_available` ADD `reserved_quantity` INT NOT NULL DEFAULT '0' AFTER `physical_quantity`; -ALTER TABLE `PREFIX_stock_mvt` CHANGE `id_stock` `id_stock` INT(11) UNSIGNED NOT NULL COMMENT 'since ps 1.7 corresponding to id_stock_available'; +ALTER TABLE `PREFIX_stock_mvt` CHANGE `id_stock` `id_stock` INT(11) NOT NULL COMMENT 'since ps 1.7 corresponding to id_stock_available'; +ALTER TABLE `PREFIX_stock_mvt` CHANGE `id_stock_mvt` `id_stock_mvt` BIGINT(20) NOT NULL AUTO_INCREMENT; +ALTER TABLE `PREFIX_stock_mvt` CHANGE `id_order` `id_order` INT(11) DEFAULT NULL; +ALTER TABLE `PREFIX_stock_mvt` CHANGE `id_supply_order` `id_supply_order` INT(11) DEFAULT NULL; +ALTER TABLE `PREFIX_stock_mvt` CHANGE `id_stock_mvt_reason` `id_stock_mvt_reason` INT(11) NOT NULL; +ALTER TABLE `PREFIX_stock_mvt` CHANGE `id_employee` `id_employee` INT(11) NOT NULL; +ALTER TABLE `PREFIX_stock_mvt` CHANGE `physical_quantity` `physical_quantity` INT(11) NOT NULL; +ALTER TABLE `PREFIX_stock_mvt` CHANGE `referer` `referer` BIGINT(20) DEFAULT NULL; ALTER TABLE `PREFIX_stock_mvt` CHANGE `employee_lastname` `employee_lastname` varchar(32) DEFAULT NULL; ALTER TABLE `PREFIX_stock_mvt` CHANGE `employee_firstname` `employee_firstname` varchar(32) DEFAULT NULL; ALTER TABLE `PREFIX_stock_mvt` CHANGE `sign` `sign` smallint(6) NOT NULL DEFAULT '1'; From 3107619581f3c91c4f637d72e8be84c7691b5039 Mon Sep 17 00:00:00 2001 From: morgan Date: Tue, 30 Apr 2024 11:11:22 +0200 Subject: [PATCH 03/16] Add 1.7.6. queries --- upgrade/sql/1.7.6.0.sql | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/upgrade/sql/1.7.6.0.sql b/upgrade/sql/1.7.6.0.sql index 4aa9a56a1..d0070f072 100644 --- a/upgrade/sql/1.7.6.0.sql +++ b/upgrade/sql/1.7.6.0.sql @@ -271,3 +271,9 @@ INSERT IGNORE INTO `PREFIX_authorization_role` (`slug`) VALUES ('ROLE_MOD_TAB_ADMINPARENTMODULESCATALOG_READ'), ('ROLE_MOD_TAB_ADMINPARENTMODULESCATALOG_UPDATE'), ('ROLE_MOD_TAB_ADMINPARENTMODULESCATALOG_DELETE'); + +DROP INDEX admin_filter_search_idx ON `PREFIX_admin_filter`; +ALTER TABLE `PREFIX_admin_filter` ADD filter_id VARCHAR(255) NOT NULL; +CREATE UNIQUE INDEX admin_filter_search_id_idx ON `PREFIX_admin_filter` (employee, shop, controller, action, filter_id); +DROP INDEX id_product ON `PREFIX_product_download`; +DROP INDEX product_active ON `PREFIX_product_download`; From 8e80d3efefe230f8a59013eb9675a3771576eb53 Mon Sep 17 00:00:00 2001 From: morgan Date: Tue, 30 Apr 2024 17:54:01 +0200 Subject: [PATCH 04/16] Add 1.7.7 queries --- upgrade/sql/1.7.7.0.sql | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/upgrade/sql/1.7.7.0.sql b/upgrade/sql/1.7.7.0.sql index 875ff6e2a..0a7a8b081 100644 --- a/upgrade/sql/1.7.7.0.sql +++ b/upgrade/sql/1.7.7.0.sql @@ -312,7 +312,7 @@ ALTER TABLE `PREFIX_connections` CHANGE `http_referer` `http_referer` varchar(25 ALTER TABLE `PREFIX_product_download` CHANGE `display_filename` `display_filename` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL; /* Doctrine update happens too late to update the new enabled field, so we preset everything here */ -ALTER TABLE `PREFIX_tab` ADD enabled TINYINT(1) NOT NULL; +ALTER TABLE `PREFIX_tab` ADD enabled TINYINT(1) NOT NULL, ADD route_name VARCHAR(256) DEFAULT NULL, CHANGE class_name class_name VARCHAR(64) NOT NULL; /* PHP:ps_1770_preset_tab_enabled(); */; /* PHP:ps_1770_update_order_status_colors(); */; @@ -678,3 +678,6 @@ DELETE FROM `PREFIX_hook` WHERE name = 'actionFrontControllerAfterInit'; /* Update wrong hook alias */ UPDATE `PREFIX_hook_alias` SET name = 'displayHeader', alias = 'Header' WHERE name = 'Header' AND alias = 'displayHeader'; + +ALTER TABLE `PREFIX_translation` CHANGE `key` `key` TEXT NOT NULL COLLATE utf8_bin; +ALTER TABLE `PREFIX_admin_filter` CHANGE filter_id filter_id VARCHAR(191) NOT NULL; From bd5d54609c75f2f086d3228f633d268e17333dee Mon Sep 17 00:00:00 2001 From: morgan Date: Tue, 30 Apr 2024 18:08:46 +0200 Subject: [PATCH 05/16] Add 1.7.8 queries --- upgrade/sql/1.7.8.0.sql | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/upgrade/sql/1.7.8.0.sql b/upgrade/sql/1.7.8.0.sql index ab61c3634..5f69395cd 100644 --- a/upgrade/sql/1.7.8.0.sql +++ b/upgrade/sql/1.7.8.0.sql @@ -201,3 +201,11 @@ CREATE TABLE IF NOT EXISTS `PREFIX_feature_flag` ( INSERT INTO `PREFIX_feature_flag` (`name`, `state`, `label_wording`, `label_domain`, `description_wording`, `description_domain`) VALUES ('product_page_v2', 0, 'Experimental product page', 'Admin.Advparameters.Feature', 'This page benefits from increased performance and includes new features such as a new combination management system. Please note this is a work in progress and some features are not available yet.', 'Admin.Advparameters.Help'); + +DROP INDEX id_shop ON `PREFIX_shop_url`; +DROP INDEX full_shop_url ON `PREFIX_shop_url`; +DROP INDEX full_shop_url_ssl ON `PREFIX_shop_url`; +ALTER TABLE `PREFIX_shop_url` CHANGE id_shop_url id_shop_url INT AUTO_INCREMENT NOT NULL, CHANGE id_shop id_shop INT NOT NULL; +CREATE INDEX IDX_279F19DA274A50A0 ON `PREFIX_shop_url` (id_shop); +ALTER TABLE `PREFIX_shop` ADD color VARCHAR(50) NOT NULL; +ALTER TABLE `PREFIX_shop_group` ADD color VARCHAR(50) NOT NULL; From f671eb9c751a18111a7133181f3c21cdde63f1ae Mon Sep 17 00:00:00 2001 From: morgan Date: Tue, 30 Apr 2024 18:15:55 +0200 Subject: [PATCH 06/16] Add 8.0 queries --- upgrade/sql/8.0.0.sql | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/upgrade/sql/8.0.0.sql b/upgrade/sql/8.0.0.sql index d3b45051d..f1dc7d4a9 100644 --- a/upgrade/sql/8.0.0.sql +++ b/upgrade/sql/8.0.0.sql @@ -239,3 +239,8 @@ UPDATE `PREFIX_carrier` SET `name` = 'Click and collect' WHERE `name` = '0'; /* PHP:drop_column_if_exists('product_attribute', 'location'); */; /* PHP:drop_column_if_exists('product_attribute', 'quantity'); */; /* PHP:drop_column_if_exists('orders', 'shipping_number'); */; + +ALTER TABLE `PREFIX_tab` DROP hide_host_mode; +ALTER TABLE `PREFIX_feature_flag` + CHANGE label_wording label_wording VARCHAR(512) DEFAULT '' NOT NULL, + CHANGE description_wording description_wording VARCHAR(512) DEFAULT '' NOT NULL; From a1e64c42ac6306ef8687542575c475deb64a70e3 Mon Sep 17 00:00:00 2001 From: morgan Date: Tue, 30 Apr 2024 18:20:19 +0200 Subject: [PATCH 07/16] Add 8.1 queries --- upgrade/sql/8.1.0.sql | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/upgrade/sql/8.1.0.sql b/upgrade/sql/8.1.0.sql index fda006dec..01424ce32 100644 --- a/upgrade/sql/8.1.0.sql +++ b/upgrade/sql/8.1.0.sql @@ -84,3 +84,24 @@ ALTER TABLE `PREFIX_stock_mvt` CHANGE `physical_quantity` `physical_quantity` IN /* PHP:add_hook('actionAdminBreadcrumbModifier', 'Modify back office breadcrumb', 'This hook allows modifying back office breadcrumb'); */; ALTER TABLE `PREFIX_order_payment` ADD `id_employee` INT NULL AFTER `date_add`; + +CREATE TABLE `PREFIX_authorized_application` +( + id_authorized_application INT UNSIGNED AUTO_INCREMENT NOT NULL, + name VARCHAR(255) NOT NULL, + description LONGTEXT NOT NULL, + UNIQUE INDEX UNIQ_475B9BA55E237E06 (name), + PRIMARY KEY (id_authorized_application) +) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB; + +CREATE TABLE `PREFIX_api_access` +( + id_api_access INT UNSIGNED AUTO_INCREMENT NOT NULL, + id_authorized_application INT UNSIGNED NOT NULL, + client_id VARCHAR(255) NOT NULL, + client_secret VARCHAR(255) NOT NULL, + active TINYINT(1) NOT NULL, + scopes LONGTEXT NOT NULL COMMENT '(DC2Type:array)', + INDEX IDX_6E064442D8BFF738 (id_authorized_application), + PRIMARY KEY (id_api_access) +) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB; From 150a23f28bc0aa6d4b4e4e043b7790f6e24adc15 Mon Sep 17 00:00:00 2001 From: morgan Date: Thu, 2 May 2024 11:21:04 +0200 Subject: [PATCH 08/16] Add v9 related queries --- upgrade/sql/8.1.0.sql | 4 ++-- upgrade/sql/9.0.0.sql | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/upgrade/sql/8.1.0.sql b/upgrade/sql/8.1.0.sql index 01424ce32..08f043e5b 100644 --- a/upgrade/sql/8.1.0.sql +++ b/upgrade/sql/8.1.0.sql @@ -92,7 +92,7 @@ CREATE TABLE `PREFIX_authorized_application` description LONGTEXT NOT NULL, UNIQUE INDEX UNIQ_475B9BA55E237E06 (name), PRIMARY KEY (id_authorized_application) -) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB; +) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = ENGINE_TYPE; CREATE TABLE `PREFIX_api_access` ( @@ -104,4 +104,4 @@ CREATE TABLE `PREFIX_api_access` scopes LONGTEXT NOT NULL COMMENT '(DC2Type:array)', INDEX IDX_6E064442D8BFF738 (id_authorized_application), PRIMARY KEY (id_api_access) -) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB; +) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = ENGINE_TYPE; diff --git a/upgrade/sql/9.0.0.sql b/upgrade/sql/9.0.0.sql index 0b4d833d2..00d211a03 100644 --- a/upgrade/sql/9.0.0.sql +++ b/upgrade/sql/9.0.0.sql @@ -123,3 +123,43 @@ DROP TABLE `PREFIX_accessory`; RENAME TABLE `PREFIX_accessory_tmp` TO `PREFIX_accessory`; ALTER TABLE `PREFIX_stock_mvt` MODIFY `id_supply_order` INT(11) DEFAULT '0'; + +DROP TABLE IF EXISTS `PREFIX_api_access`; +DROP TABLE IF EXISTS `PREFIX_authorized_application`; +CREATE TABLE `PREFIX_api_client` +( + `id_api_client` int(10) unsigned NOT NULL AUTO_INCREMENT, + `client_id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, + `client_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, + `client_secret` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `enabled` tinyint(1) NOT NULL, + `scopes` json NOT NULL, + `description` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', + `external_issuer` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `lifetime` int(11) NOT NULL DEFAULT '3600', + PRIMARY KEY (`id_api_client`), + UNIQUE KEY `api_client_client_id_idx` (`client_id`,`external_issuer`), + UNIQUE KEY `api_client_client_name_idx` (`client_name`,`external_issuer`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +ALTER TABLE `PREFIX_image_type` + CHANGE `id_image_type` `id_image_type` int(11) NOT NULL AUTO_INCREMENT, + CHANGE `width` `width` int(11) NOT NULL, + CHANGE `height` `height` int(11) NOT NULL, + CHANGE `products` `products` tinyint(1) NOT NULL, + CHANGE `manufacturers` `manufacturers` tinyint(1) NOT NULL, + CHANGE `stores` `stores` tinyint(1) NOT NULL, + DROP key `image_type_name`, + ADD UNIQUE KEY `UNIQ_907C95215E237E06` (`name`); + +CREATE TABLE `PREFIX_mutation` ( + `id_mutation` int(10) unsigned NOT NULL AUTO_INCREMENT, + `mutation_table` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, + `mutation_row_id` bigint(20) NOT NULL, + `mutation_action` enum('create','update','delete') COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `mutator_type` enum('employee','api_client','module') COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `mutator_identifier` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, + `mutation_details` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `date_add` datetime NOT NULL, + PRIMARY KEY (`id_mutation`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; From 8fdf343264f3c7666c4b76ed187066f3cc3dae71 Mon Sep 17 00:00:00 2001 From: morgan Date: Thu, 2 May 2024 11:33:31 +0200 Subject: [PATCH 09/16] Add 1.7.5 related changes --- upgrade/sql/1.7.5.0.sql | 9 +++++++++ upgrade/sql/1.7.7.0.sql | 4 +++- upgrade/sql/1.7.8.0.sql | 3 ++- upgrade/sql/8.0.0.sql | 5 ++--- upgrade/sql/8.1.0.sql | 4 ++-- 5 files changed, 18 insertions(+), 7 deletions(-) diff --git a/upgrade/sql/1.7.5.0.sql b/upgrade/sql/1.7.5.0.sql index 467f3706d..176914249 100644 --- a/upgrade/sql/1.7.5.0.sql +++ b/upgrade/sql/1.7.5.0.sql @@ -88,3 +88,12 @@ ALTER TABLE `PREFIX_product_lang` ALTER TABLE `PREFIX_customer_thread` CHANGE `email` `email` varchar(255) NOT NULL; + +ALTER TABLE `PREFIX_attribute_group_lang` + ADD KEY `IDX_4653726CBA299860` (`id_lang`); + +ALTER TABLE `PREFIX_attribute_lang` + ADD KEY `IDX_3ABE46A7BA299860` (`id_lang`); + +ALTER TABLE `PREFIX_tab_lang` + ADD KEY `IDX_CFD9262DBA299860` (`id_lang`); diff --git a/upgrade/sql/1.7.7.0.sql b/upgrade/sql/1.7.7.0.sql index 0a7a8b081..402ccfbda 100644 --- a/upgrade/sql/1.7.7.0.sql +++ b/upgrade/sql/1.7.7.0.sql @@ -312,7 +312,9 @@ ALTER TABLE `PREFIX_connections` CHANGE `http_referer` `http_referer` varchar(25 ALTER TABLE `PREFIX_product_download` CHANGE `display_filename` `display_filename` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL; /* Doctrine update happens too late to update the new enabled field, so we preset everything here */ -ALTER TABLE `PREFIX_tab` ADD enabled TINYINT(1) NOT NULL, ADD route_name VARCHAR(256) DEFAULT NULL, CHANGE class_name class_name VARCHAR(64) NOT NULL; +ALTER TABLE `PREFIX_tab` ADD enabled TINYINT(1) NOT NULL; +ALTER TABLE `PREFIX_tab` ADD route_name VARCHAR(256) DEFAULT NULL; +ALTER TABLE `PREFIX_tab` CHANGE class_name class_name VARCHAR(64) NOT NULL; /* PHP:ps_1770_preset_tab_enabled(); */; /* PHP:ps_1770_update_order_status_colors(); */; diff --git a/upgrade/sql/1.7.8.0.sql b/upgrade/sql/1.7.8.0.sql index 5f69395cd..c4ddf6f2e 100644 --- a/upgrade/sql/1.7.8.0.sql +++ b/upgrade/sql/1.7.8.0.sql @@ -205,7 +205,8 @@ VALUES DROP INDEX id_shop ON `PREFIX_shop_url`; DROP INDEX full_shop_url ON `PREFIX_shop_url`; DROP INDEX full_shop_url_ssl ON `PREFIX_shop_url`; -ALTER TABLE `PREFIX_shop_url` CHANGE id_shop_url id_shop_url INT AUTO_INCREMENT NOT NULL, CHANGE id_shop id_shop INT NOT NULL; +ALTER TABLE `PREFIX_shop_url` CHANGE id_shop_url id_shop_url INT AUTO_INCREMENT NOT NULL; +ALTER TABLE `PREFIX_shop_url` CHANGE id_shop id_shop INT NOT NULL; CREATE INDEX IDX_279F19DA274A50A0 ON `PREFIX_shop_url` (id_shop); ALTER TABLE `PREFIX_shop` ADD color VARCHAR(50) NOT NULL; ALTER TABLE `PREFIX_shop_group` ADD color VARCHAR(50) NOT NULL; diff --git a/upgrade/sql/8.0.0.sql b/upgrade/sql/8.0.0.sql index f1dc7d4a9..a05874031 100644 --- a/upgrade/sql/8.0.0.sql +++ b/upgrade/sql/8.0.0.sql @@ -241,6 +241,5 @@ UPDATE `PREFIX_carrier` SET `name` = 'Click and collect' WHERE `name` = '0'; /* PHP:drop_column_if_exists('orders', 'shipping_number'); */; ALTER TABLE `PREFIX_tab` DROP hide_host_mode; -ALTER TABLE `PREFIX_feature_flag` - CHANGE label_wording label_wording VARCHAR(512) DEFAULT '' NOT NULL, - CHANGE description_wording description_wording VARCHAR(512) DEFAULT '' NOT NULL; +ALTER TABLE `PREFIX_feature_flag` CHANGE label_wording label_wording VARCHAR(512) DEFAULT '' NOT NULL; +ALTER TABLE `PREFIX_feature_flag` CHANGE description_wording description_wording VARCHAR(512) DEFAULT '' NOT NULL; diff --git a/upgrade/sql/8.1.0.sql b/upgrade/sql/8.1.0.sql index 08f043e5b..9724788ef 100644 --- a/upgrade/sql/8.1.0.sql +++ b/upgrade/sql/8.1.0.sql @@ -92,7 +92,7 @@ CREATE TABLE `PREFIX_authorized_application` description LONGTEXT NOT NULL, UNIQUE INDEX UNIQ_475B9BA55E237E06 (name), PRIMARY KEY (id_authorized_application) -) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = ENGINE_TYPE; +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; CREATE TABLE `PREFIX_api_access` ( @@ -104,4 +104,4 @@ CREATE TABLE `PREFIX_api_access` scopes LONGTEXT NOT NULL COMMENT '(DC2Type:array)', INDEX IDX_6E064442D8BFF738 (id_authorized_application), PRIMARY KEY (id_api_access) -) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = ENGINE_TYPE; +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; From 6c60d19bb22fc7093a7702e2d0d7ca89bf9d835a Mon Sep 17 00:00:00 2001 From: morgan Date: Fri, 17 May 2024 16:54:52 +0200 Subject: [PATCH 10/16] Update 1.7.1.0 sql --- upgrade/sql/1.7.1.0.sql | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/upgrade/sql/1.7.1.0.sql b/upgrade/sql/1.7.1.0.sql index a26324a5f..493d1c588 100644 --- a/upgrade/sql/1.7.1.0.sql +++ b/upgrade/sql/1.7.1.0.sql @@ -112,3 +112,35 @@ ALTER TABLE `PREFIX_tab_lang` CHANGE `id_tab` `id_tab` INT(11) NOT NULL; ALTER TABLE `PREFIX_tab_lang` CHANGE `id_lang` `id_lang` INT(11) NOT NULL; /* PHP:add_missing_unique_key_from_authorization_role(); */; + +ALTER TABLE `PREFIX_attribute` ADD KEY `attribute_group` (`id_attribute_group`); +ALTER TABLE `PREFIX_attribute` DROP KEY IDX_6C3355F967A664FB; + +ALTER TABLE `PREFIX_attribute_lang` DROP FOREIGN KEY FK_3ABE46A7BA299860; +ALTER TABLE `PREFIX_attribute_lang` DROP KEY IDX_3ABE46A7BA299860; + +ALTER TABLE `PREFIX_attribute_group_lang` DROP FOREIGN KEY FK_4653726CBA299860; +ALTER TABLE `PREFIX_attribute_group_lang` DROP KEY IDX_4653726CBA299860; + +ALTER TABLE `PREFIX_lang` CHANGE `active` `active` tinyint(1) NOT NULL; + +ALTER TABLE `PREFIX_tab` COLLATE=utf8_unicode_ci; +ALTER TABLE `PREFIX_tab` CHANGE `position` `position` int(11) NOT NULL; +ALTER TABLE `PREFIX_tab` CHANGE `module` `module` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL; +ALTER TABLE `PREFIX_tab` CHANGE `position` `position` int(11) NOT NULL; +ALTER TABLE `PREFIX_tab` CHANGE `class_name` `class_name` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL; +ALTER TABLE `PREFIX_tab` CHANGE `icon` `icon` varchar(32) NOT NULL; +ALTER TABLE `PREFIX_tab` DROP KEY `class_name`; +ALTER TABLE `PREFIX_tab` DROP KEY `id_parent`; + +ALTER TABLE `PREFIX_tab_lang` COLLATE=utf8_unicode_ci; +ALTER TABLE `PREFIX_tab_lang` CHANGE `name` `name` varchar(128) NOT NULL; +ALTER TABLE `PREFIX_tab_lang` ADD CONSTRAINT `FK_CFD9262DED47AB56` FOREIGN KEY (`id_tab`) REFERENCES `PREFIX_tab` (`id_tab`); +ALTER TABLE `PREFIX_tab_lang` ADD KEY `IDX_CFD9262DED47AB56` (`id_tab`); + +ALTER TABLE `PREFIX_translation` CHANGE `domain` `domain` varchar(80) NOT NULL; +ALTER TABLE `PREFIX_translation` CHANGE `theme` `theme` varchar(32) DEFAULT NULL; +ALTER TABLE `PREFIX_translation` CHANGE `key` `key` text COLLATE utf8_unicode_ci NOT NULL; +ALTER TABLE `PREFIX_translation` CHANGE `translation` `translation` text COLLATE utf8_unicode_ci NOT NULL; + +ALTER TABLE `PREFIX_translation` DROP INDEX `theme`; From 5f41c113db70f202f5a43c2887d768a118f16415 Mon Sep 17 00:00:00 2001 From: morgan Date: Mon, 20 May 2024 09:53:19 +0200 Subject: [PATCH 11/16] Update 1.7.2.0 sql --- upgrade/sql/1.7.2.0.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/upgrade/sql/1.7.2.0.sql b/upgrade/sql/1.7.2.0.sql index f49b6ceec..70b53cdce 100644 --- a/upgrade/sql/1.7.2.0.sql +++ b/upgrade/sql/1.7.2.0.sql @@ -30,6 +30,7 @@ ALTER TABLE `PREFIX_supply_order_detail` CHANGE `isbn` `isbn` VARCHAR(32) NULL D ALTER TABLE `PREFIX_stock_available` ADD `physical_quantity` INT NOT NULL DEFAULT '0' AFTER `quantity`; ALTER TABLE `PREFIX_stock_available` ADD `reserved_quantity` INT NOT NULL DEFAULT '0' AFTER `physical_quantity`; +ALTER TABLE `PREFIX_stock_mvt` COLLATE=utf8_unicode_ci; ALTER TABLE `PREFIX_stock_mvt` CHANGE `id_stock` `id_stock` INT(11) NOT NULL COMMENT 'since ps 1.7 corresponding to id_stock_available'; ALTER TABLE `PREFIX_stock_mvt` CHANGE `id_stock_mvt` `id_stock_mvt` BIGINT(20) NOT NULL AUTO_INCREMENT; ALTER TABLE `PREFIX_stock_mvt` CHANGE `id_order` `id_order` INT(11) DEFAULT NULL; From 8e470505a87b44b20f26c662625cf0d2d9195b31 Mon Sep 17 00:00:00 2001 From: morgan Date: Mon, 20 May 2024 11:07:34 +0200 Subject: [PATCH 12/16] Update 1.7.7.0 sql --- upgrade/sql/1.7.1.0.sql | 32 ++++++++++++---------------- upgrade/sql/1.7.7.0.sql | 46 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 19 deletions(-) diff --git a/upgrade/sql/1.7.1.0.sql b/upgrade/sql/1.7.1.0.sql index 493d1c588..16deb9595 100644 --- a/upgrade/sql/1.7.1.0.sql +++ b/upgrade/sql/1.7.1.0.sql @@ -78,23 +78,27 @@ INSERT INTO `PREFIX_operating_system` (`name`) VALUES ('Windows 8.1'), ('Windows /* UPDATE TO DOCTRINE */ ALTER TABLE `PREFIX_attribute` CHANGE `id_attribute` `id_attribute` INT(11) NOT NULL AUTO_INCREMENT; ALTER TABLE `PREFIX_attribute` CHANGE `id_attribute_group` `id_attribute_group` INT(11) NOT NULL; +ALTER TABLE `PREFIX_attribute` ADD KEY `attribute_group` (`id_attribute_group`); +ALTER TABLE `PREFIX_attribute` DROP KEY IDX_6C3355F967A664FB; ALTER TABLE `PREFIX_attribute_group` CHANGE `id_attribute_group` `id_attribute_group` INT(11) NOT NULL AUTO_INCREMENT; ALTER TABLE `PREFIX_attribute_group_lang` CHANGE `id_attribute_group` `id_attribute_group` INT(11) NOT NULL; ALTER TABLE `PREFIX_attribute_group_lang` CHANGE `id_lang` `id_lang` INT(11) NOT NULL; +ALTER TABLE `PREFIX_attribute_group_lang` DROP FOREIGN KEY FK_4653726CBA299860; +ALTER TABLE `PREFIX_attribute_group_lang` DROP KEY IDX_4653726CBA299860; ALTER TABLE `PREFIX_attribute_group_shop` CHANGE `id_attribute_group` `id_attribute_group` INT(11) NOT NULL; ALTER TABLE `PREFIX_attribute_group_shop` CHANGE `id_shop` `id_shop` INT(11) NOT NULL; ALTER TABLE `PREFIX_attribute_lang` CHANGE `id_attribute` `id_attribute` INT(11) NOT NULL; ALTER TABLE `PREFIX_attribute_lang` CHANGE `id_lang` `id_lang` INT(11) NOT NULL; +ALTER TABLE `PREFIX_attribute_lang` DROP FOREIGN KEY FK_3ABE46A7BA299860; +ALTER TABLE `PREFIX_attribute_lang` DROP KEY IDX_3ABE46A7BA299860; ALTER TABLE `PREFIX_attribute_shop` CHANGE `id_attribute` `id_attribute` INT(11) NOT NULL; ALTER TABLE `PREFIX_attribute_shop` CHANGE `id_shop` `id_shop` INT(11) NOT NULL; -ALTER TABLE `PREFIX_lang` CHANGE `id_lang` `id_lang` INT(11) NOT NULL AUTO_INCREMENT; - ALTER TABLE `PREFIX_lang_shop` CHANGE `id_lang` `id_lang` INT(11) NOT NULL; ALTER TABLE `PREFIX_lang_shop` CHANGE `id_shop` `id_shop` INT(11) NOT NULL; @@ -103,28 +107,16 @@ ALTER TABLE `PREFIX_shop` CHANGE `id_shop_group` `id_shop_group` INT(11) NOT NUL ALTER TABLE `PREFIX_shop_group` CHANGE `id_shop_group` `id_shop_group` INT(11) NOT NULL AUTO_INCREMENT; -ALTER TABLE `PREFIX_tab` CHANGE `id_tab` `id_tab` INT(11) NOT NULL AUTO_INCREMENT; -ALTER TABLE `PREFIX_tab` CHANGE `active` `active` TINYINT(1) NOT NULL; -ALTER TABLE `PREFIX_tab` CHANGE `hide_host_mode` `hide_host_mode` TINYINT(1) NOT NULL; -ALTER TABLE `PREFIX_tab` CHANGE `icon` `icon` VARCHAR(32) DEFAULT NULL; - -ALTER TABLE `PREFIX_tab_lang` CHANGE `id_tab` `id_tab` INT(11) NOT NULL; -ALTER TABLE `PREFIX_tab_lang` CHANGE `id_lang` `id_lang` INT(11) NOT NULL; - /* PHP:add_missing_unique_key_from_authorization_role(); */; -ALTER TABLE `PREFIX_attribute` ADD KEY `attribute_group` (`id_attribute_group`); -ALTER TABLE `PREFIX_attribute` DROP KEY IDX_6C3355F967A664FB; - -ALTER TABLE `PREFIX_attribute_lang` DROP FOREIGN KEY FK_3ABE46A7BA299860; -ALTER TABLE `PREFIX_attribute_lang` DROP KEY IDX_3ABE46A7BA299860; - -ALTER TABLE `PREFIX_attribute_group_lang` DROP FOREIGN KEY FK_4653726CBA299860; -ALTER TABLE `PREFIX_attribute_group_lang` DROP KEY IDX_4653726CBA299860; - +ALTER TABLE `PREFIX_lang` CHANGE `id_lang` `id_lang` INT(11) NOT NULL AUTO_INCREMENT; ALTER TABLE `PREFIX_lang` CHANGE `active` `active` tinyint(1) NOT NULL; ALTER TABLE `PREFIX_tab` COLLATE=utf8_unicode_ci; +ALTER TABLE `PREFIX_tab` CHANGE `id_tab` `id_tab` INT(11) NOT NULL AUTO_INCREMENT; +ALTER TABLE `PREFIX_tab` CHANGE `active` `active` TINYINT(1) NOT NULL; +ALTER TABLE `PREFIX_tab` CHANGE `hide_host_mode` `hide_host_mode` TINYINT(1) NOT NULL; +ALTER TABLE `PREFIX_tab` CHANGE `icon` `icon` VARCHAR(32) DEFAULT NULL; ALTER TABLE `PREFIX_tab` CHANGE `position` `position` int(11) NOT NULL; ALTER TABLE `PREFIX_tab` CHANGE `module` `module` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL; ALTER TABLE `PREFIX_tab` CHANGE `position` `position` int(11) NOT NULL; @@ -134,6 +126,8 @@ ALTER TABLE `PREFIX_tab` DROP KEY `class_name`; ALTER TABLE `PREFIX_tab` DROP KEY `id_parent`; ALTER TABLE `PREFIX_tab_lang` COLLATE=utf8_unicode_ci; +ALTER TABLE `PREFIX_tab_lang` CHANGE `id_tab` `id_tab` INT(11) NOT NULL; +ALTER TABLE `PREFIX_tab_lang` CHANGE `id_lang` `id_lang` INT(11) NOT NULL; ALTER TABLE `PREFIX_tab_lang` CHANGE `name` `name` varchar(128) NOT NULL; ALTER TABLE `PREFIX_tab_lang` ADD CONSTRAINT `FK_CFD9262DED47AB56` FOREIGN KEY (`id_tab`) REFERENCES `PREFIX_tab` (`id_tab`); ALTER TABLE `PREFIX_tab_lang` ADD KEY `IDX_CFD9262DED47AB56` (`id_tab`); diff --git a/upgrade/sql/1.7.7.0.sql b/upgrade/sql/1.7.7.0.sql index 402ccfbda..cd5249c19 100644 --- a/upgrade/sql/1.7.7.0.sql +++ b/upgrade/sql/1.7.7.0.sql @@ -683,3 +683,49 @@ UPDATE `PREFIX_hook_alias` SET name = 'displayHeader', alias = 'Header' WHERE na ALTER TABLE `PREFIX_translation` CHANGE `key` `key` TEXT NOT NULL COLLATE utf8_bin; ALTER TABLE `PREFIX_admin_filter` CHANGE filter_id filter_id VARCHAR(191) NOT NULL; + +ALTER TABLE `PREFIX_admin_filter` ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +ALTER TABLE `PREFIX_admin_filter` CHANGE `controller` `controller` varchar(60) COLLATE utf8mb4_unicode_ci NOT NULL; +ALTER TABLE `PREFIX_admin_filter` CHANGE `action` `action` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL; +ALTER TABLE `PREFIX_admin_filter` CHANGE `filter` `filter` longtext COLLATE utf8mb4_unicode_ci NOT NULL; +ALTER TABLE `PREFIX_admin_filter` CHANGE `filter_id` `filter_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL; + +ALTER TABLE `PREFIX_attribute` COLLATE=utf8mb4_unicode_ci; +ALTER TABLE `PREFIX_attribute` CHANGE `color` `color` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL; +ALTER TABLE `PREFIX_attribute_lang` COLLATE=utf8mb4_unicode_ci; +ALTER TABLE `PREFIX_attribute_lang` CHANGE `name` `name` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL; +ALTER TABLE `PREFIX_attribute_shop` COLLATE=utf8mb4_unicode_ci; +ALTER TABLE `PREFIX_attribute_group` COLLATE=utf8mb4_unicode_ci; +ALTER TABLE `PREFIX_attribute_group` CHANGE `group_type` `group_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL; +ALTER TABLE `PREFIX_attribute_group_lang` COLLATE=utf8mb4_unicode_ci; +ALTER TABLE `PREFIX_attribute_group_lang` CHANGE `name` `name` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL; +ALTER TABLE `PREFIX_attribute_group_lang` CHANGE `public_name` `public_name` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL; +ALTER TABLE `PREFIX_attribute_group_shop` COLLATE=utf8mb4_unicode_ci; +ALTER TABLE `PREFIX_lang` COLLATE=utf8mb4_unicode_ci; +ALTER TABLE `PREFIX_lang` CHANGE `name` `name` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL; +ALTER TABLE `PREFIX_lang` CHANGE `iso_code` `iso_code` varchar(2) COLLATE utf8mb4_unicode_ci NOT NULL; +ALTER TABLE `PREFIX_lang` CHANGE `language_code` `language_code` varchar(5) COLLATE utf8mb4_unicode_ci NOT NULL; +ALTER TABLE `PREFIX_lang` CHANGE `locale` `locale` varchar(5) COLLATE utf8mb4_unicode_ci NOT NULL; +ALTER TABLE `PREFIX_lang` CHANGE `date_format_lite` `date_format_lite` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL; +ALTER TABLE `PREFIX_lang` CHANGE `date_format_full` `date_format_full` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL; +ALTER TABLE `PREFIX_lang_shop` COLLATE=utf8mb4_unicode_ci; +ALTER TABLE `PREFIX_shop` COLLATE=utf8mb4_unicode_ci; +ALTER TABLE `PREFIX_shop` CHANGE `name` `name` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL; +ALTER TABLE `PREFIX_shop` CHANGE `theme_name` `theme_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL; +ALTER TABLE `PREFIX_shop_group` COLLATE=utf8mb4_unicode_ci; +ALTER TABLE `PREFIX_shop_group` CHANGE `name` `name` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL; +ALTER TABLE `PREFIX_stock_mvt` COLLATE=utf8mb4_unicode_ci; +ALTER TABLE `PREFIX_stock_mvt` CHANGE `employee_lastname` `employee_lastname` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL; +ALTER TABLE `PREFIX_stock_mvt` CHANGE `employee_firstname` `employee_firstname` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL; +ALTER TABLE `PREFIX_tab` COLLATE=utf8mb4_unicode_ci; +ALTER TABLE `PREFIX_tab` CHANGE `module` `module` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL; +ALTER TABLE `PREFIX_tab` CHANGE `class_name` `class_name` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL; +ALTER TABLE `PREFIX_tab` CHANGE `route_name` `route_name` varchar(256) COLLATE utf8mb4_unicode_ci DEFAULT NULL; +ALTER TABLE `PREFIX_tab` CHANGE `icon` `icon` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL; +ALTER TABLE `PREFIX_tab_lang` COLLATE=utf8mb4_unicode_ci; +ALTER TABLE `PREFIX_tab_lang` CHANGE `name` `name` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL; +ALTER TABLE `PREFIX_module_history` CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +ALTER TABLE `PREFIX_translation` CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +ALTER TABLE `PREFIX_translation` CHANGE `translation` `translation` text COLLATE utf8mb4_unicode_ci NOT NULL; +ALTER TABLE `PREFIX_translation` CHANGE `domain` `domain` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL; +ALTER TABLE `PREFIX_translation` CHANGE `theme` `theme` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL; From 3b4c151b39e43116e55241c7bc9d5d7dce7071e6 Mon Sep 17 00:00:00 2001 From: morgan Date: Mon, 20 May 2024 11:57:19 +0200 Subject: [PATCH 13/16] Update 1.7.8.0 sql --- upgrade/sql/1.7.8.0.sql | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/upgrade/sql/1.7.8.0.sql b/upgrade/sql/1.7.8.0.sql index c4ddf6f2e..754ebd6d2 100644 --- a/upgrade/sql/1.7.8.0.sql +++ b/upgrade/sql/1.7.8.0.sql @@ -188,12 +188,12 @@ before Doctrine schema update */ /* consequently we create the table manually */ CREATE TABLE IF NOT EXISTS `PREFIX_feature_flag` ( `id_feature_flag` INT(10) unsigned NOT NULL AUTO_INCREMENT, - `name` VARCHAR(191) COLLATE utf8mb4_general_ci NOT NULL, + `name` VARCHAR(191) COLLATE utf8mb4_unicode_ci NOT NULL, `state` TINYINT(1) NOT NULL DEFAULT '0', - `label_wording` VARCHAR(191) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '', - `label_domain` VARCHAR(255) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '', - `description_wording` VARCHAR(191) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '', - `description_domain` VARCHAR(255) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '', + `label_wording` VARCHAR(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', + `label_domain` VARCHAR(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', + `description_wording` VARCHAR(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', + `description_domain` VARCHAR(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', PRIMARY KEY (`id_feature_flag`), UNIQUE KEY `UNIQ_91700F175E237E06` (`name`) ) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; From 8a8564bd916fea8ed53533a3918579588889e681 Mon Sep 17 00:00:00 2001 From: morgan Date: Mon, 20 May 2024 12:13:02 +0200 Subject: [PATCH 14/16] Update 8.1.0 sql --- upgrade/sql/8.1.0.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/upgrade/sql/8.1.0.sql b/upgrade/sql/8.1.0.sql index 9724788ef..7903c6195 100644 --- a/upgrade/sql/8.1.0.sql +++ b/upgrade/sql/8.1.0.sql @@ -28,8 +28,8 @@ INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VAL CREATE TABLE `PREFIX_product_attribute_lang` ( `id_product_attribute` int(10) unsigned NOT NULL, `id_lang` int(10) unsigned NOT NULL, - `available_now` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL, - `available_later` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL, + `available_now` varchar(255) DEFAULT NULL, + `available_later` varchar(255) DEFAULT NULL, PRIMARY KEY (`id_product_attribute`, `id_lang`) ) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; @@ -88,7 +88,7 @@ ALTER TABLE `PREFIX_order_payment` ADD `id_employee` INT NULL AFTER `date_add`; CREATE TABLE `PREFIX_authorized_application` ( id_authorized_application INT UNSIGNED AUTO_INCREMENT NOT NULL, - name VARCHAR(255) NOT NULL, + name VARCHAR(50) NOT NULL, description LONGTEXT NOT NULL, UNIQUE INDEX UNIQ_475B9BA55E237E06 (name), PRIMARY KEY (id_authorized_application) From 2d185d042cc087476dab221253fe892c1e89264c Mon Sep 17 00:00:00 2001 From: morgan Date: Mon, 20 May 2024 12:17:12 +0200 Subject: [PATCH 15/16] Update 8.1.0 sql --- upgrade/sql/8.1.0.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upgrade/sql/8.1.0.sql b/upgrade/sql/8.1.0.sql index 7903c6195..f319b9cb1 100644 --- a/upgrade/sql/8.1.0.sql +++ b/upgrade/sql/8.1.0.sql @@ -31,7 +31,7 @@ CREATE TABLE `PREFIX_product_attribute_lang` ( `available_now` varchar(255) DEFAULT NULL, `available_later` varchar(255) DEFAULT NULL, PRIMARY KEY (`id_product_attribute`, `id_lang`) -) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8mb4; INSERT INTO `PREFIX_product_attribute_lang` (id_product_attribute, id_lang, available_now, available_later) From 803c6f3721e483f66b1fb9c9b5577a9760c00a29 Mon Sep 17 00:00:00 2001 From: morgan Date: Mon, 20 May 2024 14:30:32 +0200 Subject: [PATCH 16/16] Update 9.0.0 sql --- upgrade/sql/9.0.0.sql | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/upgrade/sql/9.0.0.sql b/upgrade/sql/9.0.0.sql index 00d211a03..3602a399d 100644 --- a/upgrade/sql/9.0.0.sql +++ b/upgrade/sql/9.0.0.sql @@ -163,3 +163,9 @@ CREATE TABLE `PREFIX_mutation` ( `date_add` datetime NOT NULL, PRIMARY KEY (`id_mutation`) ) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +ALTER TABLE `PREFIX_access` ADD KEY `IDX_564352A15FCA037F` (`id_profile`); +ALTER TABLE `PREFIX_access` ADD KEY `IDX_564352A18C6DE0E5` (`id_authorization_role`); +ALTER TABLE `PREFIX_accessory` CHARSET=utf8mb4; +ALTER TABLE `PREFIX_employee` ADD KEY `IDX_1D8DF9EBBA299860` (`id_lang`); +ALTER TABLE `PREFIX_employee_session` ADD KEY `IDX_B10E26A1D449934` (`id_employee`);