Add thelia version and fix FK and types
modifié: core/lib/Thelia/Model/Map/ExportCategoryTableMap.php modifié: core/lib/Thelia/Model/Map/ExportI18nTableMap.php modifié: core/lib/Thelia/Model/Map/ExportTableMap.php modifié: core/lib/Thelia/Model/Map/ImportCategoryTableMap.php modifié: core/lib/Thelia/Model/Map/ImportI18nTableMap.php modifié: core/lib/Thelia/Model/Map/ImportTableMap.php modifié: local/config/schema.xml modifié: setup/thelia.sql modifié: setup/update/2.0.3-beta2.sql
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
/**
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
/**
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -1537,11 +1537,11 @@
|
||||
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
|
||||
<column name="ref" required="true" size="255" type="VARCHAR" />
|
||||
<column name="title" required="true" size="255" type="VARCHAR" />
|
||||
<column name="description" type="LONGVARCHAR" />
|
||||
<column name="description" type="CLOB" />
|
||||
<column name="position" required="true" type="INTEGER" />
|
||||
<column name="export_category_id" required="true" type="INTEGER" />
|
||||
<column name="handle_class" required="true" type="LONGVARCHAR" />
|
||||
<foreign-key foreignTable="export_category" name="fk_export_export_category_id">
|
||||
<column name="handle_class" required="true" type="CLOB" />
|
||||
<foreign-key foreignTable="export_category" name="fk_export_export_category_id" onDelete="RESTRICT" onUpdate="CASCADE">
|
||||
<reference foreign="id" local="export_category_id" />
|
||||
</foreign-key>
|
||||
<unique name="ref_UNIQUE">
|
||||
@@ -1572,11 +1572,11 @@
|
||||
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
|
||||
<column name="ref" required="true" size="255" type="VARCHAR" />
|
||||
<column name="title" required="true" size="255" type="VARCHAR" />
|
||||
<column name="description" type="LONGVARCHAR" />
|
||||
<column name="description" type="CLOB" />
|
||||
<column name="position" required="true" type="INTEGER" />
|
||||
<column name="import_category_id" required="true" type="INTEGER" />
|
||||
<column name="handle_class" required="true" type="LONGVARCHAR" />
|
||||
<foreign-key foreignTable="import_category" name="fk_import_import_category_id">
|
||||
<column name="handle_class" required="true" type="CLOB" />
|
||||
<foreign-key foreignTable="import_category" name="fk_import_import_category_id" onDelete="RESTRICT" onUpdate="CASCADE">
|
||||
<reference foreign="id" local="import_category_id" />
|
||||
</foreign-key>
|
||||
<unique name="ref_UNIQUE">
|
||||
|
||||
@@ -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`)
|
||||
|
||||
@@ -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`);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user