From f6920fd12f7bb526f414bd48befc4406eb3c6f4a Mon Sep 17 00:00:00 2001 From: Benjamin Perche Date: Fri, 8 Aug 2014 09:05:23 +0200 Subject: [PATCH] =?UTF-8?q?Add=20thelia=20version=20and=20fix=20FK=20and?= =?UTF-8?q?=20types=20=09modifi=C3=A9:=20=20=20=20=20=20=20=20=20core/lib/?= =?UTF-8?q?Thelia/Model/Map/ExportCategoryTableMap.php=20=09modifi=C3=A9:?= =?UTF-8?q?=20=20=20=20=20=20=20=20=20core/lib/Thelia/Model/Map/ExportI18n?= =?UTF-8?q?TableMap.php=20=09modifi=C3=A9:=20=20=20=20=20=20=20=20=20core/?= =?UTF-8?q?lib/Thelia/Model/Map/ExportTableMap.php=20=09modifi=C3=A9:=20?= =?UTF-8?q?=20=20=20=20=20=20=20=20core/lib/Thelia/Model/Map/ImportCategor?= =?UTF-8?q?yTableMap.php=20=09modifi=C3=A9:=20=20=20=20=20=20=20=20=20core?= =?UTF-8?q?/lib/Thelia/Model/Map/ImportI18nTableMap.php=20=09modifi=C3=A9:?= =?UTF-8?q?=20=20=20=20=20=20=20=20=20core/lib/Thelia/Model/Map/ImportTabl?= =?UTF-8?q?eMap.php=20=09modifi=C3=A9:=20=20=20=20=20=20=20=20=20local/con?= =?UTF-8?q?fig/schema.xml=20=09modifi=C3=A9:=20=20=20=20=20=20=20=20=20set?= =?UTF-8?q?up/thelia.sql=20=09modifi=C3=A9:=20=20=20=20=20=20=20=20=20setu?= =?UTF-8?q?p/update/2.0.3-beta2.sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Model/Map/ExportCategoryTableMap.php | 2 +- .../Thelia/Model/Map/ExportI18nTableMap.php | 2 +- core/lib/Thelia/Model/Map/ExportTableMap.php | 4 +- .../Model/Map/ImportCategoryTableMap.php | 2 +- .../Thelia/Model/Map/ImportI18nTableMap.php | 2 +- core/lib/Thelia/Model/Map/ImportTableMap.php | 4 +- local/config/schema.xml | 3186 ++++++++--------- setup/thelia.sql | 12 +- setup/update/2.0.3-beta2.sql | 3 + 9 files changed, 1612 insertions(+), 1605 deletions(-) diff --git a/core/lib/Thelia/Model/Map/ExportCategoryTableMap.php b/core/lib/Thelia/Model/Map/ExportCategoryTableMap.php index d875dc85f..4faea2a8f 100644 --- a/core/lib/Thelia/Model/Map/ExportCategoryTableMap.php +++ b/core/lib/Thelia/Model/Map/ExportCategoryTableMap.php @@ -167,7 +167,7 @@ class ExportCategoryTableMap extends TableMap */ public function buildRelations() { - $this->addRelation('Export', '\\Thelia\\Model\\Export', RelationMap::ONE_TO_MANY, array('id' => 'export_category_id', ), null, null, 'Exports'); + $this->addRelation('Export', '\\Thelia\\Model\\Export', RelationMap::ONE_TO_MANY, array('id' => 'export_category_id', ), 'RESTRICT', 'CASCADE', 'Exports'); $this->addRelation('ExportCategoryI18n', '\\Thelia\\Model\\ExportCategoryI18n', RelationMap::ONE_TO_MANY, array('id' => 'id', ), 'CASCADE', null, 'ExportCategoryI18ns'); } // buildRelations() diff --git a/core/lib/Thelia/Model/Map/ExportI18nTableMap.php b/core/lib/Thelia/Model/Map/ExportI18nTableMap.php index 8c1e3e669..228a4e288 100644 --- a/core/lib/Thelia/Model/Map/ExportI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/ExportI18nTableMap.php @@ -144,7 +144,7 @@ class ExportI18nTableMap extends TableMap $this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'export', 'ID', true, null, null); $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_US'); $this->addColumn('TITLE', 'Title', 'VARCHAR', true, 255, null); - $this->addColumn('DESCRIPTION', 'Description', 'LONGVARCHAR', false, null, null); + $this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null); } // initialize() /** diff --git a/core/lib/Thelia/Model/Map/ExportTableMap.php b/core/lib/Thelia/Model/Map/ExportTableMap.php index 222387116..0071f9e8b 100644 --- a/core/lib/Thelia/Model/Map/ExportTableMap.php +++ b/core/lib/Thelia/Model/Map/ExportTableMap.php @@ -169,7 +169,7 @@ class ExportTableMap extends TableMap $this->addColumn('REF', 'Ref', 'VARCHAR', true, 255, null); $this->addColumn('POSITION', 'Position', 'INTEGER', true, null, null); $this->addForeignKey('EXPORT_CATEGORY_ID', 'ExportCategoryId', 'INTEGER', 'export_category', 'ID', true, null, null); - $this->addColumn('HANDLE_CLASS', 'HandleClass', 'LONGVARCHAR', true, null, null); + $this->addColumn('HANDLE_CLASS', 'HandleClass', 'CLOB', true, null, null); $this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null); $this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null); } // initialize() @@ -179,7 +179,7 @@ class ExportTableMap extends TableMap */ public function buildRelations() { - $this->addRelation('ExportCategory', '\\Thelia\\Model\\ExportCategory', RelationMap::MANY_TO_ONE, array('export_category_id' => 'id', ), null, null); + $this->addRelation('ExportCategory', '\\Thelia\\Model\\ExportCategory', RelationMap::MANY_TO_ONE, array('export_category_id' => 'id', ), 'RESTRICT', 'CASCADE'); $this->addRelation('ExportI18n', '\\Thelia\\Model\\ExportI18n', RelationMap::ONE_TO_MANY, array('id' => 'id', ), 'CASCADE', null, 'ExportI18ns'); } // buildRelations() diff --git a/core/lib/Thelia/Model/Map/ImportCategoryTableMap.php b/core/lib/Thelia/Model/Map/ImportCategoryTableMap.php index 1bee217ba..8dcc78c4c 100644 --- a/core/lib/Thelia/Model/Map/ImportCategoryTableMap.php +++ b/core/lib/Thelia/Model/Map/ImportCategoryTableMap.php @@ -167,7 +167,7 @@ class ImportCategoryTableMap extends TableMap */ public function buildRelations() { - $this->addRelation('Import', '\\Thelia\\Model\\Import', RelationMap::ONE_TO_MANY, array('id' => 'import_category_id', ), null, null, 'Imports'); + $this->addRelation('Import', '\\Thelia\\Model\\Import', RelationMap::ONE_TO_MANY, array('id' => 'import_category_id', ), 'RESTRICT', 'CASCADE', 'Imports'); $this->addRelation('ImportCategoryI18n', '\\Thelia\\Model\\ImportCategoryI18n', RelationMap::ONE_TO_MANY, array('id' => 'id', ), 'CASCADE', null, 'ImportCategoryI18ns'); } // buildRelations() diff --git a/core/lib/Thelia/Model/Map/ImportI18nTableMap.php b/core/lib/Thelia/Model/Map/ImportI18nTableMap.php index 5efb8e7f9..98279a3c8 100644 --- a/core/lib/Thelia/Model/Map/ImportI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/ImportI18nTableMap.php @@ -144,7 +144,7 @@ class ImportI18nTableMap extends TableMap $this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'import', 'ID', true, null, null); $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_US'); $this->addColumn('TITLE', 'Title', 'VARCHAR', true, 255, null); - $this->addColumn('DESCRIPTION', 'Description', 'LONGVARCHAR', false, null, null); + $this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null); } // initialize() /** diff --git a/core/lib/Thelia/Model/Map/ImportTableMap.php b/core/lib/Thelia/Model/Map/ImportTableMap.php index 7b59a2200..401a785dc 100644 --- a/core/lib/Thelia/Model/Map/ImportTableMap.php +++ b/core/lib/Thelia/Model/Map/ImportTableMap.php @@ -169,7 +169,7 @@ class ImportTableMap extends TableMap $this->addColumn('REF', 'Ref', 'VARCHAR', true, 255, null); $this->addColumn('POSITION', 'Position', 'INTEGER', true, null, null); $this->addForeignKey('IMPORT_CATEGORY_ID', 'ImportCategoryId', 'INTEGER', 'import_category', 'ID', true, null, null); - $this->addColumn('HANDLE_CLASS', 'HandleClass', 'LONGVARCHAR', true, null, null); + $this->addColumn('HANDLE_CLASS', 'HandleClass', 'CLOB', true, null, null); $this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null); $this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null); } // initialize() @@ -179,7 +179,7 @@ class ImportTableMap extends TableMap */ public function buildRelations() { - $this->addRelation('ImportCategory', '\\Thelia\\Model\\ImportCategory', RelationMap::MANY_TO_ONE, array('import_category_id' => 'id', ), null, null); + $this->addRelation('ImportCategory', '\\Thelia\\Model\\ImportCategory', RelationMap::MANY_TO_ONE, array('import_category_id' => 'id', ), 'RESTRICT', 'CASCADE'); $this->addRelation('ImportI18n', '\\Thelia\\Model\\ImportI18n', RelationMap::ONE_TO_MANY, array('id' => 'id', ), 'CASCADE', null, 'ImportI18ns'); } // buildRelations() diff --git a/local/config/schema.xml b/local/config/schema.xml index 06071b525..44169ab1d 100644 --- a/local/config/schema.xml +++ b/local/config/schema.xml @@ -1,1593 +1,1593 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - -
- - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - -
- - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - -
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - -
- - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - -
- - - - - - - - - - - - -
- - - - - - - - - - - - -
- - - - - - - - - - - - -
- - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - -
- - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - -
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + +
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
diff --git a/setup/thelia.sql b/setup/thelia.sql index 94f851f0e..7db348d48 100644 --- a/setup/thelia.sql +++ b/setup/thelia.sql @@ -1902,7 +1902,7 @@ CREATE TABLE `export` `ref` VARCHAR(255) NOT NULL, `position` INTEGER NOT NULL, `export_category_id` INTEGER NOT NULL, - `handle_class` TEXT NOT NULL, + `handle_class` LONGTEXT NOT NULL, `created_at` DATETIME, `updated_at` DATETIME, PRIMARY KEY (`id`), @@ -1911,6 +1911,8 @@ CREATE TABLE `export` CONSTRAINT `fk_export_export_category_id` FOREIGN KEY (`export_category_id`) REFERENCES `export_category` (`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT ) ENGINE=InnoDB CHARACTER SET='utf8'; -- --------------------------------------------------------------------- @@ -1942,7 +1944,7 @@ CREATE TABLE `import` `ref` VARCHAR(255) NOT NULL, `position` INTEGER NOT NULL, `import_category_id` INTEGER NOT NULL, - `handle_class` TEXT NOT NULL, + `handle_class` LONGTEXT NOT NULL, `created_at` DATETIME, `updated_at` DATETIME, PRIMARY KEY (`id`), @@ -1951,6 +1953,8 @@ CREATE TABLE `import` CONSTRAINT `fk_import_import_category_id` FOREIGN KEY (`import_category_id`) REFERENCES `import_category` (`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT ) ENGINE=InnoDB CHARACTER SET='utf8'; -- --------------------------------------------------------------------- @@ -2677,7 +2681,7 @@ CREATE TABLE `export_i18n` `id` INTEGER NOT NULL, `locale` VARCHAR(5) DEFAULT 'en_US' NOT NULL, `title` VARCHAR(255) NOT NULL, - `description` TEXT, + `description` LONGTEXT, PRIMARY KEY (`id`,`locale`), CONSTRAINT `export_i18n_FK_1` FOREIGN KEY (`id`) @@ -2714,7 +2718,7 @@ CREATE TABLE `import_i18n` `id` INTEGER NOT NULL, `locale` VARCHAR(5) DEFAULT 'en_US' NOT NULL, `title` VARCHAR(255) NOT NULL, - `description` TEXT, + `description` LONGTEXT, PRIMARY KEY (`id`,`locale`), CONSTRAINT `import_i18n_FK_1` FOREIGN KEY (`id`) diff --git a/setup/update/2.0.3-beta2.sql b/setup/update/2.0.3-beta2.sql index 8252d4adc..7075cca64 100644 --- a/setup/update/2.0.3-beta2.sql +++ b/setup/update/2.0.3-beta2.sql @@ -1,5 +1,8 @@ SET FOREIGN_KEY_CHECKS = 0; +UPDATE `config` SET `value`='2.0.3-beta2' WHERE `name`='thelia_version'; +UPDATE `config` SET `value`='beta2' WHERE `name`='thelia_extra_version'; + ALTER TABLE `export` ADD INDEX `fk_export_1_idx` (`export_category_id`); ALTER TABLE `import` ADD INDEX `fk_import_1_idx` (`import_category_id`);