From b2cf8363536045a9b2194c152b0a41541cf9b93b Mon Sep 17 00:00:00 2001 From: Julien Chanseaume Date: Mon, 4 Aug 2014 22:17:00 +0200 Subject: [PATCH 1/4] prepared release 2.0.3-beta --- CHANGELOG.md | 2 +- core/lib/Thelia/Core/Thelia.php | 2 +- core/lib/Thelia/Install/Update.php | 2 ++ setup/insert.sql | 4 ++-- setup/update/{2.0.3.sql => 2.0.3-beta.sql} | 0 5 files changed, 6 insertions(+), 4 deletions(-) rename setup/update/{2.0.3.sql => 2.0.3-beta.sql} (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index b178114ba..6a9635a2a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -#2.0.3 +#2.0.3-beta - New coupon type: Free product if selected products are in the cart. - New feature: Product Brands / Suppliers management - New 'brand' loop and substitution. product, image and document loop have been updated. diff --git a/core/lib/Thelia/Core/Thelia.php b/core/lib/Thelia/Core/Thelia.php index 20b57e088..116c44c5f 100644 --- a/core/lib/Thelia/Core/Thelia.php +++ b/core/lib/Thelia/Core/Thelia.php @@ -47,7 +47,7 @@ use Thelia\Model\ModuleQuery; class Thelia extends Kernel { - const THELIA_VERSION = '2.0.2'; + const THELIA_VERSION = '2.0.3-beta'; public function init() { diff --git a/core/lib/Thelia/Install/Update.php b/core/lib/Thelia/Install/Update.php index 306a1906b..685c30801 100644 --- a/core/lib/Thelia/Install/Update.php +++ b/core/lib/Thelia/Install/Update.php @@ -34,6 +34,8 @@ class Update '5' => '2.0.0', '6' => '2.0.1', '7' => '2.0.2', + '8' => '2.0.3-beta', + ); protected function isLatestVersion($version) diff --git a/setup/insert.sql b/setup/insert.sql index 2494099d5..cc361b5b9 100644 --- a/setup/insert.sql +++ b/setup/insert.sql @@ -49,8 +49,8 @@ INSERT INTO `config` (`name`, `value`, `secured`, `hidden`, `created_at`, `updat ('thelia_version','2.0.2', 1, 1, NOW(), NOW()), ('thelia_major_version','2', 1, 1, NOW(), NOW()), ('thelia_minus_version','0', 1, 1, NOW(), NOW()), -('thelia_release_version','2', 1, 1, NOW(), NOW()), -('thelia_extra_version','', 1, 1, NOW(), NOW()), +('thelia_release_version','3', 1, 1, NOW(), NOW()), +('thelia_extra_version','beta', 1, 1, NOW(), NOW()), ('front_cart_country_cookie_name','fcccn', 1, 1, NOW(), NOW()), ('front_cart_country_cookie_expires','2592000', 1, 1, NOW(), NOW()), ('sitemap_ttl','7200', 1, 1, NOW(), NOW()), diff --git a/setup/update/2.0.3.sql b/setup/update/2.0.3-beta.sql similarity index 100% rename from setup/update/2.0.3.sql rename to setup/update/2.0.3-beta.sql From 2e830a25ddbd87da3b7a5d3389c01bc44e619ad3 Mon Sep 17 00:00:00 2001 From: Julien Chanseaume Date: Mon, 4 Aug 2014 22:22:00 +0200 Subject: [PATCH 2/4] added extra version --- setup/update/2.0.3-beta.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/update/2.0.3-beta.sql b/setup/update/2.0.3-beta.sql index cca6e0d99..16eb9201d 100644 --- a/setup/update/2.0.3-beta.sql +++ b/setup/update/2.0.3-beta.sql @@ -4,7 +4,7 @@ SET FOREIGN_KEY_CHECKS = 0; UPDATE `config` SET `value`='2.0.3' WHERE `name`='thelia_version'; UPDATE `config` SET `value`='3' WHERE `name`='thelia_release_version'; -UPDATE `config` SET `value`='' WHERE `name`='thelia_extra_version'; +UPDATE `config` SET `value`='beta' WHERE `name`='thelia_extra_version'; INSERT INTO `config` (`name`, `value`, `secured`, `hidden`, `created_at`, `updated_at`) VALUES ('store_description', '', 0, 0, NOW(), NOW()); From 94a2952b3632df32ea50b6d68edff829426bb9a0 Mon Sep 17 00:00:00 2001 From: Julien Chanseaume Date: Mon, 4 Aug 2014 22:38:06 +0200 Subject: [PATCH 3/4] fixed typo --- CHANGELOG.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a9635a2a..125bb2633 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,8 +14,7 @@ - Default front office template: - Display enhancement - Optimization of the uses of Thelia loops to gain performances and consistency - - Optimization for SEO : meta description fallback, ti>>>>>>> Updated Changelog -tle on category page, ... + - Optimization for SEO : meta description fallback, title on category page, ... - new PSE layout in product page, attributes are separated - Support of 'check-available-stock' config variable - Terms and conditions agreement is now in the order process From 8b685e1818fbd552f991d69e250a34cebac4e48d Mon Sep 17 00:00:00 2001 From: Julien Chanseaume Date: Tue, 5 Aug 2014 06:32:15 +0200 Subject: [PATCH 4/4] Fixed update sql for coupon and export --- setup/update/2.0.3-beta.sql | 189 +++++++++++++++++++++++++----------- 1 file changed, 133 insertions(+), 56 deletions(-) diff --git a/setup/update/2.0.3-beta.sql b/setup/update/2.0.3-beta.sql index 16eb9201d..b7e58612d 100644 --- a/setup/update/2.0.3-beta.sql +++ b/setup/update/2.0.3-beta.sql @@ -153,24 +153,25 @@ ALTER TABLE `coupon_version` ADD `version_created_by` VARCHAR(100) AFTER `versio # Add coupon_customer_count table # ------------------------------- -CREATE TABLE `coupon_customer_count` -( - `coupon_id` INTEGER NOT NULL, - `customer_id` INTEGER NOT NULL, - `count` INTEGER DEFAULT 0 NOT NULL, - INDEX `fk_coupon_customer_customer_id_idx` (`customer_id`), - INDEX `fk_coupon_customer_coupon_id_idx` (`coupon_id`), - CONSTRAINT `fk_coupon_customer_customer_id` +ALTER TABLE `coupon_customer_count` + DROP FOREIGN KEY `fk_coupon_customer_customer_id`; + +ALTER TABLE `coupon_customer_count` + DROP FOREIGN KEY `fk_coupon_customer_coupon_id`; + +ALTER TABLE `coupon_customer_count` + ADD CONSTRAINT `fk_coupon_customer_customer_id` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`id`) ON UPDATE RESTRICT - ON DELETE CASCADE, - CONSTRAINT `fk_coupon_customer_coupon_id` + ON DELETE CASCADE; + +ALTER TABLE `coupon_customer_count` + ADD CONSTRAINT `fk_coupon_customer_coupon_id` FOREIGN KEY (`coupon_id`) REFERENCES `coupon` (`id`) ON UPDATE RESTRICT - ON DELETE CASCADE -) ENGINE=InnoDB; + ON DELETE CASCADE; # --------------------------------------------------------------------- # Add Brand tables and related resources @@ -363,13 +364,13 @@ DROP TABLE IF EXISTS `import_category`; CREATE TABLE `import_category` ( - `id` INTEGER NOT NULL AUTO_INCREMENT, - `ref` VARCHAR(255) NOT NULL, - `position` INTEGER NOT NULL, - `created_at` DATETIME, - `updated_at` DATETIME, - PRIMARY KEY (`id`), - UNIQUE INDEX `ref_UNIQUE` (`ref`) + `id` INTEGER NOT NULL AUTO_INCREMENT, + `ref` VARCHAR(255) NOT NULL, + `position` INTEGER NOT NULL, + `created_at` DATETIME, + `updated_at` DATETIME, + PRIMARY KEY (`id`), + UNIQUE INDEX `ref_UNIQUE` (`ref`) ) ENGINE=InnoDB; -- --------------------------------------------------------------------- @@ -380,13 +381,13 @@ DROP TABLE IF EXISTS `export_category`; CREATE TABLE `export_category` ( - `id` INTEGER NOT NULL AUTO_INCREMENT, - `ref` VARCHAR(255) NOT NULL, - `position` INTEGER NOT NULL, - `created_at` DATETIME, - `updated_at` DATETIME, - PRIMARY KEY (`id`), - UNIQUE INDEX `ref_UNIQUE` (`ref`) + `id` INTEGER NOT NULL AUTO_INCREMENT, + `ref` VARCHAR(255) NOT NULL, + `position` INTEGER NOT NULL, + `created_at` DATETIME, + `updated_at` DATETIME, + PRIMARY KEY (`id`), + UNIQUE INDEX `ref_UNIQUE` (`ref`) ) ENGINE=InnoDB; -- --------------------------------------------------------------------- @@ -397,21 +398,21 @@ DROP TABLE IF EXISTS `import`; CREATE TABLE `import` ( - `id` INTEGER NOT NULL AUTO_INCREMENT, - `ref` VARCHAR(255) NOT NULL, - `import_category_id` INTEGER NOT NULL, - `position` INTEGER NOT NULL, - `handle_class` LONGTEXT NOT NULL, - `created_at` DATETIME, - `updated_at` DATETIME, - PRIMARY KEY (`id`), - UNIQUE INDEX `ref_UNIQUE` (`ref`), - INDEX `idx_import_import_category_id` (`import_category_id`), - CONSTRAINT `fk_import_import_category_id` - FOREIGN KEY (`import_category_id`) - REFERENCES `import_category` (`id`) - ON UPDATE RESTRICT - ON DELETE CASCADE + `id` INTEGER NOT NULL AUTO_INCREMENT, + `ref` VARCHAR(255) NOT NULL, + `import_category_id` INTEGER NOT NULL, + `position` INTEGER NOT NULL, + `handle_class` LONGTEXT NOT NULL, + `created_at` DATETIME, + `updated_at` DATETIME, + PRIMARY KEY (`id`), + UNIQUE INDEX `ref_UNIQUE` (`ref`), + INDEX `idx_import_import_category_id` (`import_category_id`), + CONSTRAINT `fk_import_import_category_id` + FOREIGN KEY (`import_category_id`) + REFERENCES `import_category` (`id`) + ON UPDATE RESTRICT + ON DELETE CASCADE ) ENGINE=InnoDB; -- --------------------------------------------------------------------- @@ -422,21 +423,97 @@ DROP TABLE IF EXISTS `export`; CREATE TABLE `export` ( - `id` INTEGER NOT NULL AUTO_INCREMENT, - `ref` VARCHAR(255) NOT NULL, - `export_category_id` INTEGER NOT NULL, - `position` INTEGER NOT NULL, - `handle_class` LONGTEXT NOT NULL, - `created_at` DATETIME, - `updated_at` DATETIME, - PRIMARY KEY (`id`), - UNIQUE INDEX `ref_UNIQUE` (`ref`), - INDEX `idx_export_export_category_id` (`export_category_id`), - CONSTRAINT `fk_export_export_category_id` - FOREIGN KEY (`export_category_id`) - REFERENCES `export_category` (`id`) - ON UPDATE RESTRICT - ON DELETE CASCADE + `id` INTEGER NOT NULL AUTO_INCREMENT, + `ref` VARCHAR(255) NOT NULL, + `export_category_id` INTEGER NOT NULL, + `position` INTEGER NOT NULL, + `handle_class` LONGTEXT NOT NULL, + `created_at` DATETIME, + `updated_at` DATETIME, + PRIMARY KEY (`id`), + UNIQUE INDEX `ref_UNIQUE` (`ref`), + INDEX `idx_export_export_category_id` (`export_category_id`), + CONSTRAINT `fk_export_export_category_id` + FOREIGN KEY (`export_category_id`) + REFERENCES `export_category` (`id`) + ON UPDATE RESTRICT + ON DELETE CASCADE +) ENGINE=InnoDB; + + + +-- --------------------------------------------------------------------- +-- import_category_i18n +-- --------------------------------------------------------------------- + +DROP TABLE IF EXISTS `import_category_i18n`; + +CREATE TABLE `import_category_i18n` +( + `id` INTEGER NOT NULL, + `locale` VARCHAR(5) DEFAULT 'en_US' NOT NULL, + `title` VARCHAR(255) NOT NULL, + PRIMARY KEY (`id`,`locale`), + CONSTRAINT `import_category_i18n_FK_1` + FOREIGN KEY (`id`) + REFERENCES `import_category` (`id`) + ON DELETE CASCADE +) ENGINE=InnoDB; + +-- --------------------------------------------------------------------- +-- export_category_i18n +-- --------------------------------------------------------------------- + +DROP TABLE IF EXISTS `export_category_i18n`; + +CREATE TABLE `export_category_i18n` +( + `id` INTEGER NOT NULL, + `locale` VARCHAR(5) DEFAULT 'en_US' NOT NULL, + `title` VARCHAR(255) NOT NULL, + PRIMARY KEY (`id`,`locale`), + CONSTRAINT `export_category_i18n_FK_1` + FOREIGN KEY (`id`) + REFERENCES `export_category` (`id`) + ON DELETE CASCADE +) ENGINE=InnoDB; + +-- --------------------------------------------------------------------- +-- import_i18n +-- --------------------------------------------------------------------- + +DROP TABLE IF EXISTS `import_i18n`; + +CREATE TABLE `import_i18n` +( + `id` INTEGER NOT NULL, + `locale` VARCHAR(5) DEFAULT 'en_US' NOT NULL, + `title` VARCHAR(255) NOT NULL, + `description` LONGTEXT, + PRIMARY KEY (`id`,`locale`), + CONSTRAINT `import_i18n_FK_1` + FOREIGN KEY (`id`) + REFERENCES `import` (`id`) + ON DELETE CASCADE +) ENGINE=InnoDB; + +-- --------------------------------------------------------------------- +-- export_i18n +-- --------------------------------------------------------------------- + +DROP TABLE IF EXISTS `export_i18n`; + +CREATE TABLE `export_i18n` +( + `id` INTEGER NOT NULL, + `locale` VARCHAR(5) DEFAULT 'en_US' NOT NULL, + `title` VARCHAR(255) NOT NULL, + `description` LONGTEXT, + PRIMARY KEY (`id`,`locale`), + CONSTRAINT `export_i18n_FK_1` + FOREIGN KEY (`id`) + REFERENCES `export` (`id`) + ON DELETE CASCADE ) ENGINE=InnoDB;