From 373840240b53db66e97e57d0d44a964a5b142639 Mon Sep 17 00:00:00 2001 From: Benjamin Perche Date: Fri, 1 Aug 2014 14:50:16 +0200 Subject: [PATCH] =?UTF-8?q?Add=20imports=20and=20exports=20on=202.0.3=20?= =?UTF-8?q?=09modifi=C3=A9:=20=20=20=20=20=20=20=20=20CHANGELOG.md=20=09mo?= =?UTF-8?q?difi=C3=A9:=20=20=20=20=20=20=20=20=20setup/update/2.0.3.sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + setup/update/2.0.3.sql | 85 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 435a9f309..ad7250484 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ - Update SwiftMailer - Fix bugs on customer change password form and module "order by title" - Add the ability to place a firewall on forms. To use this in a module, extend Thelia\Form\FirewallForm instead of BaseForm +- Add Exports and Imports management #2.0.2 - Coupon UI has been redesigned. diff --git a/setup/update/2.0.3.sql b/setup/update/2.0.3.sql index 9a1095558..5b67a63d9 100644 --- a/setup/update/2.0.3.sql +++ b/setup/update/2.0.3.sql @@ -329,6 +329,91 @@ CREATE TABLE `form_firewall` INDEX `idx_form_firewall_ip_address` (`ip_address`) ) ENGINE=InnoDB; +-- --------------------------------------------------------------------- +-- import_category +-- --------------------------------------------------------------------- + +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`) +) ENGINE=InnoDB; + +-- --------------------------------------------------------------------- +-- export_category +-- --------------------------------------------------------------------- + +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`) +) ENGINE=InnoDB; + +-- --------------------------------------------------------------------- +-- import +-- --------------------------------------------------------------------- + +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 +) ENGINE=InnoDB; + +-- --------------------------------------------------------------------- +-- export +-- --------------------------------------------------------------------- + +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 +) ENGINE=InnoDB; + + INSERT INTO `config`(`name`, `value`, `secured`, `hidden`, `created_at`, `updated_at`) VALUES ('form_firewall_bruteforce_time_to_wait', '10', 0, 0, NOW(), NOW()),