Update database, add export and import handle classes
modifié: core/lib/Thelia/Model/Base/Export.php modifié: core/lib/Thelia/Model/Base/ExportQuery.php modifié: core/lib/Thelia/Model/Base/Import.php modifié: core/lib/Thelia/Model/Base/ImportQuery.php modifié: core/lib/Thelia/Model/Export.php modifié: core/lib/Thelia/Model/Import.php modifié: core/lib/Thelia/Model/Map/ExportTableMap.php modifié: core/lib/Thelia/Model/Map/ImportTableMap.php modifié: local/config/schema.xml modifié: setup/thelia.sql
This commit is contained in:
@@ -77,6 +77,12 @@ abstract class Export implements ActiveRecordInterface
|
|||||||
*/
|
*/
|
||||||
protected $position;
|
protected $position;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The value for the handleclass field.
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $handleclass;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The value for the created_at field.
|
* The value for the created_at field.
|
||||||
* @var string
|
* @var string
|
||||||
@@ -419,6 +425,17 @@ abstract class Export implements ActiveRecordInterface
|
|||||||
return $this->position;
|
return $this->position;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the [handleclass] column value.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getHandleclass()
|
||||||
|
{
|
||||||
|
|
||||||
|
return $this->handleclass;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the [optionally formatted] temporal [created_at] column value.
|
* Get the [optionally formatted] temporal [created_at] column value.
|
||||||
*
|
*
|
||||||
@@ -526,6 +543,27 @@ abstract class Export implements ActiveRecordInterface
|
|||||||
return $this;
|
return $this;
|
||||||
} // setPosition()
|
} // setPosition()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of [handleclass] column.
|
||||||
|
*
|
||||||
|
* @param string $v new value
|
||||||
|
* @return \Thelia\Model\Export The current object (for fluent API support)
|
||||||
|
*/
|
||||||
|
public function setHandleclass($v)
|
||||||
|
{
|
||||||
|
if ($v !== null) {
|
||||||
|
$v = (string) $v;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->handleclass !== $v) {
|
||||||
|
$this->handleclass = $v;
|
||||||
|
$this->modifiedColumns[ExportTableMap::HANDLECLASS] = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
} // setHandleclass()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the value of [created_at] column to a normalized version of the date/time value specified.
|
* Sets the value of [created_at] column to a normalized version of the date/time value specified.
|
||||||
*
|
*
|
||||||
@@ -614,13 +652,16 @@ abstract class Export implements ActiveRecordInterface
|
|||||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : ExportTableMap::translateFieldName('Position', TableMap::TYPE_PHPNAME, $indexType)];
|
$col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : ExportTableMap::translateFieldName('Position', TableMap::TYPE_PHPNAME, $indexType)];
|
||||||
$this->position = (null !== $col) ? (int) $col : null;
|
$this->position = (null !== $col) ? (int) $col : null;
|
||||||
|
|
||||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : ExportTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
$col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : ExportTableMap::translateFieldName('Handleclass', TableMap::TYPE_PHPNAME, $indexType)];
|
||||||
|
$this->handleclass = (null !== $col) ? (string) $col : null;
|
||||||
|
|
||||||
|
$col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : ExportTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||||
if ($col === '0000-00-00 00:00:00') {
|
if ($col === '0000-00-00 00:00:00') {
|
||||||
$col = null;
|
$col = null;
|
||||||
}
|
}
|
||||||
$this->created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
|
$this->created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
|
||||||
|
|
||||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : ExportTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
$col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : ExportTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||||
if ($col === '0000-00-00 00:00:00') {
|
if ($col === '0000-00-00 00:00:00') {
|
||||||
$col = null;
|
$col = null;
|
||||||
}
|
}
|
||||||
@@ -633,7 +674,7 @@ abstract class Export implements ActiveRecordInterface
|
|||||||
$this->ensureConsistency();
|
$this->ensureConsistency();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $startcol + 5; // 5 = ExportTableMap::NUM_HYDRATE_COLUMNS.
|
return $startcol + 6; // 6 = ExportTableMap::NUM_HYDRATE_COLUMNS.
|
||||||
|
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
throw new PropelException("Error populating \Thelia\Model\Export object", 0, $e);
|
throw new PropelException("Error populating \Thelia\Model\Export object", 0, $e);
|
||||||
@@ -897,6 +938,9 @@ abstract class Export implements ActiveRecordInterface
|
|||||||
if ($this->isColumnModified(ExportTableMap::POSITION)) {
|
if ($this->isColumnModified(ExportTableMap::POSITION)) {
|
||||||
$modifiedColumns[':p' . $index++] = '`POSITION`';
|
$modifiedColumns[':p' . $index++] = '`POSITION`';
|
||||||
}
|
}
|
||||||
|
if ($this->isColumnModified(ExportTableMap::HANDLECLASS)) {
|
||||||
|
$modifiedColumns[':p' . $index++] = '`HANDLECLASS`';
|
||||||
|
}
|
||||||
if ($this->isColumnModified(ExportTableMap::CREATED_AT)) {
|
if ($this->isColumnModified(ExportTableMap::CREATED_AT)) {
|
||||||
$modifiedColumns[':p' . $index++] = '`CREATED_AT`';
|
$modifiedColumns[':p' . $index++] = '`CREATED_AT`';
|
||||||
}
|
}
|
||||||
@@ -923,6 +967,9 @@ abstract class Export implements ActiveRecordInterface
|
|||||||
case '`POSITION`':
|
case '`POSITION`':
|
||||||
$stmt->bindValue($identifier, $this->position, PDO::PARAM_INT);
|
$stmt->bindValue($identifier, $this->position, PDO::PARAM_INT);
|
||||||
break;
|
break;
|
||||||
|
case '`HANDLECLASS`':
|
||||||
|
$stmt->bindValue($identifier, $this->handleclass, PDO::PARAM_STR);
|
||||||
|
break;
|
||||||
case '`CREATED_AT`':
|
case '`CREATED_AT`':
|
||||||
$stmt->bindValue($identifier, $this->created_at ? $this->created_at->format("Y-m-d H:i:s") : null, PDO::PARAM_STR);
|
$stmt->bindValue($identifier, $this->created_at ? $this->created_at->format("Y-m-d H:i:s") : null, PDO::PARAM_STR);
|
||||||
break;
|
break;
|
||||||
@@ -1001,9 +1048,12 @@ abstract class Export implements ActiveRecordInterface
|
|||||||
return $this->getPosition();
|
return $this->getPosition();
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
return $this->getCreatedAt();
|
return $this->getHandleclass();
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
|
return $this->getCreatedAt();
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
return $this->getUpdatedAt();
|
return $this->getUpdatedAt();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -1038,8 +1088,9 @@ abstract class Export implements ActiveRecordInterface
|
|||||||
$keys[0] => $this->getId(),
|
$keys[0] => $this->getId(),
|
||||||
$keys[1] => $this->getExportCategoryId(),
|
$keys[1] => $this->getExportCategoryId(),
|
||||||
$keys[2] => $this->getPosition(),
|
$keys[2] => $this->getPosition(),
|
||||||
$keys[3] => $this->getCreatedAt(),
|
$keys[3] => $this->getHandleclass(),
|
||||||
$keys[4] => $this->getUpdatedAt(),
|
$keys[4] => $this->getCreatedAt(),
|
||||||
|
$keys[5] => $this->getUpdatedAt(),
|
||||||
);
|
);
|
||||||
$virtualColumns = $this->virtualColumns;
|
$virtualColumns = $this->virtualColumns;
|
||||||
foreach ($virtualColumns as $key => $virtualColumn) {
|
foreach ($virtualColumns as $key => $virtualColumn) {
|
||||||
@@ -1097,9 +1148,12 @@ abstract class Export implements ActiveRecordInterface
|
|||||||
$this->setPosition($value);
|
$this->setPosition($value);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
$this->setCreatedAt($value);
|
$this->setHandleclass($value);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
|
$this->setCreatedAt($value);
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
$this->setUpdatedAt($value);
|
$this->setUpdatedAt($value);
|
||||||
break;
|
break;
|
||||||
} // switch()
|
} // switch()
|
||||||
@@ -1129,8 +1183,9 @@ abstract class Export implements ActiveRecordInterface
|
|||||||
if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
|
if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
|
||||||
if (array_key_exists($keys[1], $arr)) $this->setExportCategoryId($arr[$keys[1]]);
|
if (array_key_exists($keys[1], $arr)) $this->setExportCategoryId($arr[$keys[1]]);
|
||||||
if (array_key_exists($keys[2], $arr)) $this->setPosition($arr[$keys[2]]);
|
if (array_key_exists($keys[2], $arr)) $this->setPosition($arr[$keys[2]]);
|
||||||
if (array_key_exists($keys[3], $arr)) $this->setCreatedAt($arr[$keys[3]]);
|
if (array_key_exists($keys[3], $arr)) $this->setHandleclass($arr[$keys[3]]);
|
||||||
if (array_key_exists($keys[4], $arr)) $this->setUpdatedAt($arr[$keys[4]]);
|
if (array_key_exists($keys[4], $arr)) $this->setCreatedAt($arr[$keys[4]]);
|
||||||
|
if (array_key_exists($keys[5], $arr)) $this->setUpdatedAt($arr[$keys[5]]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1145,6 +1200,7 @@ abstract class Export implements ActiveRecordInterface
|
|||||||
if ($this->isColumnModified(ExportTableMap::ID)) $criteria->add(ExportTableMap::ID, $this->id);
|
if ($this->isColumnModified(ExportTableMap::ID)) $criteria->add(ExportTableMap::ID, $this->id);
|
||||||
if ($this->isColumnModified(ExportTableMap::EXPORT_CATEGORY_ID)) $criteria->add(ExportTableMap::EXPORT_CATEGORY_ID, $this->export_category_id);
|
if ($this->isColumnModified(ExportTableMap::EXPORT_CATEGORY_ID)) $criteria->add(ExportTableMap::EXPORT_CATEGORY_ID, $this->export_category_id);
|
||||||
if ($this->isColumnModified(ExportTableMap::POSITION)) $criteria->add(ExportTableMap::POSITION, $this->position);
|
if ($this->isColumnModified(ExportTableMap::POSITION)) $criteria->add(ExportTableMap::POSITION, $this->position);
|
||||||
|
if ($this->isColumnModified(ExportTableMap::HANDLECLASS)) $criteria->add(ExportTableMap::HANDLECLASS, $this->handleclass);
|
||||||
if ($this->isColumnModified(ExportTableMap::CREATED_AT)) $criteria->add(ExportTableMap::CREATED_AT, $this->created_at);
|
if ($this->isColumnModified(ExportTableMap::CREATED_AT)) $criteria->add(ExportTableMap::CREATED_AT, $this->created_at);
|
||||||
if ($this->isColumnModified(ExportTableMap::UPDATED_AT)) $criteria->add(ExportTableMap::UPDATED_AT, $this->updated_at);
|
if ($this->isColumnModified(ExportTableMap::UPDATED_AT)) $criteria->add(ExportTableMap::UPDATED_AT, $this->updated_at);
|
||||||
|
|
||||||
@@ -1212,6 +1268,7 @@ abstract class Export implements ActiveRecordInterface
|
|||||||
{
|
{
|
||||||
$copyObj->setExportCategoryId($this->getExportCategoryId());
|
$copyObj->setExportCategoryId($this->getExportCategoryId());
|
||||||
$copyObj->setPosition($this->getPosition());
|
$copyObj->setPosition($this->getPosition());
|
||||||
|
$copyObj->setHandleclass($this->getHandleclass());
|
||||||
$copyObj->setCreatedAt($this->getCreatedAt());
|
$copyObj->setCreatedAt($this->getCreatedAt());
|
||||||
$copyObj->setUpdatedAt($this->getUpdatedAt());
|
$copyObj->setUpdatedAt($this->getUpdatedAt());
|
||||||
|
|
||||||
@@ -1556,6 +1613,7 @@ abstract class Export implements ActiveRecordInterface
|
|||||||
$this->id = null;
|
$this->id = null;
|
||||||
$this->export_category_id = null;
|
$this->export_category_id = null;
|
||||||
$this->position = null;
|
$this->position = null;
|
||||||
|
$this->handleclass = null;
|
||||||
$this->created_at = null;
|
$this->created_at = null;
|
||||||
$this->updated_at = null;
|
$this->updated_at = null;
|
||||||
$this->alreadyInSave = false;
|
$this->alreadyInSave = false;
|
||||||
|
|||||||
@@ -25,12 +25,14 @@ use Thelia\Model\Map\ExportTableMap;
|
|||||||
* @method ChildExportQuery orderById($order = Criteria::ASC) Order by the id column
|
* @method ChildExportQuery orderById($order = Criteria::ASC) Order by the id column
|
||||||
* @method ChildExportQuery orderByExportCategoryId($order = Criteria::ASC) Order by the export_category_id column
|
* @method ChildExportQuery orderByExportCategoryId($order = Criteria::ASC) Order by the export_category_id column
|
||||||
* @method ChildExportQuery orderByPosition($order = Criteria::ASC) Order by the position column
|
* @method ChildExportQuery orderByPosition($order = Criteria::ASC) Order by the position column
|
||||||
|
* @method ChildExportQuery orderByHandleclass($order = Criteria::ASC) Order by the handleClass column
|
||||||
* @method ChildExportQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
|
* @method ChildExportQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
|
||||||
* @method ChildExportQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
|
* @method ChildExportQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
|
||||||
*
|
*
|
||||||
* @method ChildExportQuery groupById() Group by the id column
|
* @method ChildExportQuery groupById() Group by the id column
|
||||||
* @method ChildExportQuery groupByExportCategoryId() Group by the export_category_id column
|
* @method ChildExportQuery groupByExportCategoryId() Group by the export_category_id column
|
||||||
* @method ChildExportQuery groupByPosition() Group by the position column
|
* @method ChildExportQuery groupByPosition() Group by the position column
|
||||||
|
* @method ChildExportQuery groupByHandleclass() Group by the handleClass column
|
||||||
* @method ChildExportQuery groupByCreatedAt() Group by the created_at column
|
* @method ChildExportQuery groupByCreatedAt() Group by the created_at column
|
||||||
* @method ChildExportQuery groupByUpdatedAt() Group by the updated_at column
|
* @method ChildExportQuery groupByUpdatedAt() Group by the updated_at column
|
||||||
*
|
*
|
||||||
@@ -52,12 +54,14 @@ use Thelia\Model\Map\ExportTableMap;
|
|||||||
* @method ChildExport findOneById(int $id) Return the first ChildExport filtered by the id column
|
* @method ChildExport findOneById(int $id) Return the first ChildExport filtered by the id column
|
||||||
* @method ChildExport findOneByExportCategoryId(int $export_category_id) Return the first ChildExport filtered by the export_category_id column
|
* @method ChildExport findOneByExportCategoryId(int $export_category_id) Return the first ChildExport filtered by the export_category_id column
|
||||||
* @method ChildExport findOneByPosition(int $position) Return the first ChildExport filtered by the position column
|
* @method ChildExport findOneByPosition(int $position) Return the first ChildExport filtered by the position column
|
||||||
|
* @method ChildExport findOneByHandleclass(string $handleClass) Return the first ChildExport filtered by the handleClass column
|
||||||
* @method ChildExport findOneByCreatedAt(string $created_at) Return the first ChildExport filtered by the created_at column
|
* @method ChildExport findOneByCreatedAt(string $created_at) Return the first ChildExport filtered by the created_at column
|
||||||
* @method ChildExport findOneByUpdatedAt(string $updated_at) Return the first ChildExport filtered by the updated_at column
|
* @method ChildExport findOneByUpdatedAt(string $updated_at) Return the first ChildExport filtered by the updated_at column
|
||||||
*
|
*
|
||||||
* @method array findById(int $id) Return ChildExport objects filtered by the id column
|
* @method array findById(int $id) Return ChildExport objects filtered by the id column
|
||||||
* @method array findByExportCategoryId(int $export_category_id) Return ChildExport objects filtered by the export_category_id column
|
* @method array findByExportCategoryId(int $export_category_id) Return ChildExport objects filtered by the export_category_id column
|
||||||
* @method array findByPosition(int $position) Return ChildExport objects filtered by the position column
|
* @method array findByPosition(int $position) Return ChildExport objects filtered by the position column
|
||||||
|
* @method array findByHandleclass(string $handleClass) Return ChildExport objects filtered by the handleClass column
|
||||||
* @method array findByCreatedAt(string $created_at) Return ChildExport objects filtered by the created_at column
|
* @method array findByCreatedAt(string $created_at) Return ChildExport objects filtered by the created_at column
|
||||||
* @method array findByUpdatedAt(string $updated_at) Return ChildExport objects filtered by the updated_at column
|
* @method array findByUpdatedAt(string $updated_at) Return ChildExport objects filtered by the updated_at column
|
||||||
*
|
*
|
||||||
@@ -148,7 +152,7 @@ abstract class ExportQuery extends ModelCriteria
|
|||||||
*/
|
*/
|
||||||
protected function findPkSimple($key, $con)
|
protected function findPkSimple($key, $con)
|
||||||
{
|
{
|
||||||
$sql = 'SELECT `ID`, `EXPORT_CATEGORY_ID`, `POSITION`, `CREATED_AT`, `UPDATED_AT` FROM `export` WHERE `ID` = :p0';
|
$sql = 'SELECT `ID`, `EXPORT_CATEGORY_ID`, `POSITION`, `HANDLECLASS`, `CREATED_AT`, `UPDATED_AT` FROM `export` WHERE `ID` = :p0';
|
||||||
try {
|
try {
|
||||||
$stmt = $con->prepare($sql);
|
$stmt = $con->prepare($sql);
|
||||||
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
|
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
|
||||||
@@ -362,6 +366,35 @@ abstract class ExportQuery extends ModelCriteria
|
|||||||
return $this->addUsingAlias(ExportTableMap::POSITION, $position, $comparison);
|
return $this->addUsingAlias(ExportTableMap::POSITION, $position, $comparison);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query on the handleClass column
|
||||||
|
*
|
||||||
|
* Example usage:
|
||||||
|
* <code>
|
||||||
|
* $query->filterByHandleclass('fooValue'); // WHERE handleClass = 'fooValue'
|
||||||
|
* $query->filterByHandleclass('%fooValue%'); // WHERE handleClass LIKE '%fooValue%'
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* @param string $handleclass The value to use as filter.
|
||||||
|
* Accepts wildcards (* and % trigger a LIKE)
|
||||||
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
|
*
|
||||||
|
* @return ChildExportQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterByHandleclass($handleclass = null, $comparison = null)
|
||||||
|
{
|
||||||
|
if (null === $comparison) {
|
||||||
|
if (is_array($handleclass)) {
|
||||||
|
$comparison = Criteria::IN;
|
||||||
|
} elseif (preg_match('/[\%\*]/', $handleclass)) {
|
||||||
|
$handleclass = str_replace('*', '%', $handleclass);
|
||||||
|
$comparison = Criteria::LIKE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->addUsingAlias(ExportTableMap::HANDLECLASS, $handleclass, $comparison);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter the query on the created_at column
|
* Filter the query on the created_at column
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -77,6 +77,12 @@ abstract class Import implements ActiveRecordInterface
|
|||||||
*/
|
*/
|
||||||
protected $position;
|
protected $position;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The value for the handleclass field.
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $handleclass;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The value for the created_at field.
|
* The value for the created_at field.
|
||||||
* @var string
|
* @var string
|
||||||
@@ -419,6 +425,17 @@ abstract class Import implements ActiveRecordInterface
|
|||||||
return $this->position;
|
return $this->position;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the [handleclass] column value.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getHandleclass()
|
||||||
|
{
|
||||||
|
|
||||||
|
return $this->handleclass;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the [optionally formatted] temporal [created_at] column value.
|
* Get the [optionally formatted] temporal [created_at] column value.
|
||||||
*
|
*
|
||||||
@@ -526,6 +543,27 @@ abstract class Import implements ActiveRecordInterface
|
|||||||
return $this;
|
return $this;
|
||||||
} // setPosition()
|
} // setPosition()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of [handleclass] column.
|
||||||
|
*
|
||||||
|
* @param string $v new value
|
||||||
|
* @return \Thelia\Model\Import The current object (for fluent API support)
|
||||||
|
*/
|
||||||
|
public function setHandleclass($v)
|
||||||
|
{
|
||||||
|
if ($v !== null) {
|
||||||
|
$v = (string) $v;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->handleclass !== $v) {
|
||||||
|
$this->handleclass = $v;
|
||||||
|
$this->modifiedColumns[ImportTableMap::HANDLECLASS] = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
} // setHandleclass()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the value of [created_at] column to a normalized version of the date/time value specified.
|
* Sets the value of [created_at] column to a normalized version of the date/time value specified.
|
||||||
*
|
*
|
||||||
@@ -614,13 +652,16 @@ abstract class Import implements ActiveRecordInterface
|
|||||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : ImportTableMap::translateFieldName('Position', TableMap::TYPE_PHPNAME, $indexType)];
|
$col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : ImportTableMap::translateFieldName('Position', TableMap::TYPE_PHPNAME, $indexType)];
|
||||||
$this->position = (null !== $col) ? (int) $col : null;
|
$this->position = (null !== $col) ? (int) $col : null;
|
||||||
|
|
||||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : ImportTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
$col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : ImportTableMap::translateFieldName('Handleclass', TableMap::TYPE_PHPNAME, $indexType)];
|
||||||
|
$this->handleclass = (null !== $col) ? (string) $col : null;
|
||||||
|
|
||||||
|
$col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : ImportTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||||
if ($col === '0000-00-00 00:00:00') {
|
if ($col === '0000-00-00 00:00:00') {
|
||||||
$col = null;
|
$col = null;
|
||||||
}
|
}
|
||||||
$this->created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
|
$this->created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
|
||||||
|
|
||||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : ImportTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
$col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : ImportTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||||
if ($col === '0000-00-00 00:00:00') {
|
if ($col === '0000-00-00 00:00:00') {
|
||||||
$col = null;
|
$col = null;
|
||||||
}
|
}
|
||||||
@@ -633,7 +674,7 @@ abstract class Import implements ActiveRecordInterface
|
|||||||
$this->ensureConsistency();
|
$this->ensureConsistency();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $startcol + 5; // 5 = ImportTableMap::NUM_HYDRATE_COLUMNS.
|
return $startcol + 6; // 6 = ImportTableMap::NUM_HYDRATE_COLUMNS.
|
||||||
|
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
throw new PropelException("Error populating \Thelia\Model\Import object", 0, $e);
|
throw new PropelException("Error populating \Thelia\Model\Import object", 0, $e);
|
||||||
@@ -897,6 +938,9 @@ abstract class Import implements ActiveRecordInterface
|
|||||||
if ($this->isColumnModified(ImportTableMap::POSITION)) {
|
if ($this->isColumnModified(ImportTableMap::POSITION)) {
|
||||||
$modifiedColumns[':p' . $index++] = '`POSITION`';
|
$modifiedColumns[':p' . $index++] = '`POSITION`';
|
||||||
}
|
}
|
||||||
|
if ($this->isColumnModified(ImportTableMap::HANDLECLASS)) {
|
||||||
|
$modifiedColumns[':p' . $index++] = '`HANDLECLASS`';
|
||||||
|
}
|
||||||
if ($this->isColumnModified(ImportTableMap::CREATED_AT)) {
|
if ($this->isColumnModified(ImportTableMap::CREATED_AT)) {
|
||||||
$modifiedColumns[':p' . $index++] = '`CREATED_AT`';
|
$modifiedColumns[':p' . $index++] = '`CREATED_AT`';
|
||||||
}
|
}
|
||||||
@@ -923,6 +967,9 @@ abstract class Import implements ActiveRecordInterface
|
|||||||
case '`POSITION`':
|
case '`POSITION`':
|
||||||
$stmt->bindValue($identifier, $this->position, PDO::PARAM_INT);
|
$stmt->bindValue($identifier, $this->position, PDO::PARAM_INT);
|
||||||
break;
|
break;
|
||||||
|
case '`HANDLECLASS`':
|
||||||
|
$stmt->bindValue($identifier, $this->handleclass, PDO::PARAM_STR);
|
||||||
|
break;
|
||||||
case '`CREATED_AT`':
|
case '`CREATED_AT`':
|
||||||
$stmt->bindValue($identifier, $this->created_at ? $this->created_at->format("Y-m-d H:i:s") : null, PDO::PARAM_STR);
|
$stmt->bindValue($identifier, $this->created_at ? $this->created_at->format("Y-m-d H:i:s") : null, PDO::PARAM_STR);
|
||||||
break;
|
break;
|
||||||
@@ -1001,9 +1048,12 @@ abstract class Import implements ActiveRecordInterface
|
|||||||
return $this->getPosition();
|
return $this->getPosition();
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
return $this->getCreatedAt();
|
return $this->getHandleclass();
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
|
return $this->getCreatedAt();
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
return $this->getUpdatedAt();
|
return $this->getUpdatedAt();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -1038,8 +1088,9 @@ abstract class Import implements ActiveRecordInterface
|
|||||||
$keys[0] => $this->getId(),
|
$keys[0] => $this->getId(),
|
||||||
$keys[1] => $this->getImportCategoryId(),
|
$keys[1] => $this->getImportCategoryId(),
|
||||||
$keys[2] => $this->getPosition(),
|
$keys[2] => $this->getPosition(),
|
||||||
$keys[3] => $this->getCreatedAt(),
|
$keys[3] => $this->getHandleclass(),
|
||||||
$keys[4] => $this->getUpdatedAt(),
|
$keys[4] => $this->getCreatedAt(),
|
||||||
|
$keys[5] => $this->getUpdatedAt(),
|
||||||
);
|
);
|
||||||
$virtualColumns = $this->virtualColumns;
|
$virtualColumns = $this->virtualColumns;
|
||||||
foreach ($virtualColumns as $key => $virtualColumn) {
|
foreach ($virtualColumns as $key => $virtualColumn) {
|
||||||
@@ -1097,9 +1148,12 @@ abstract class Import implements ActiveRecordInterface
|
|||||||
$this->setPosition($value);
|
$this->setPosition($value);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
$this->setCreatedAt($value);
|
$this->setHandleclass($value);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
|
$this->setCreatedAt($value);
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
$this->setUpdatedAt($value);
|
$this->setUpdatedAt($value);
|
||||||
break;
|
break;
|
||||||
} // switch()
|
} // switch()
|
||||||
@@ -1129,8 +1183,9 @@ abstract class Import implements ActiveRecordInterface
|
|||||||
if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
|
if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
|
||||||
if (array_key_exists($keys[1], $arr)) $this->setImportCategoryId($arr[$keys[1]]);
|
if (array_key_exists($keys[1], $arr)) $this->setImportCategoryId($arr[$keys[1]]);
|
||||||
if (array_key_exists($keys[2], $arr)) $this->setPosition($arr[$keys[2]]);
|
if (array_key_exists($keys[2], $arr)) $this->setPosition($arr[$keys[2]]);
|
||||||
if (array_key_exists($keys[3], $arr)) $this->setCreatedAt($arr[$keys[3]]);
|
if (array_key_exists($keys[3], $arr)) $this->setHandleclass($arr[$keys[3]]);
|
||||||
if (array_key_exists($keys[4], $arr)) $this->setUpdatedAt($arr[$keys[4]]);
|
if (array_key_exists($keys[4], $arr)) $this->setCreatedAt($arr[$keys[4]]);
|
||||||
|
if (array_key_exists($keys[5], $arr)) $this->setUpdatedAt($arr[$keys[5]]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1145,6 +1200,7 @@ abstract class Import implements ActiveRecordInterface
|
|||||||
if ($this->isColumnModified(ImportTableMap::ID)) $criteria->add(ImportTableMap::ID, $this->id);
|
if ($this->isColumnModified(ImportTableMap::ID)) $criteria->add(ImportTableMap::ID, $this->id);
|
||||||
if ($this->isColumnModified(ImportTableMap::IMPORT_CATEGORY_ID)) $criteria->add(ImportTableMap::IMPORT_CATEGORY_ID, $this->import_category_id);
|
if ($this->isColumnModified(ImportTableMap::IMPORT_CATEGORY_ID)) $criteria->add(ImportTableMap::IMPORT_CATEGORY_ID, $this->import_category_id);
|
||||||
if ($this->isColumnModified(ImportTableMap::POSITION)) $criteria->add(ImportTableMap::POSITION, $this->position);
|
if ($this->isColumnModified(ImportTableMap::POSITION)) $criteria->add(ImportTableMap::POSITION, $this->position);
|
||||||
|
if ($this->isColumnModified(ImportTableMap::HANDLECLASS)) $criteria->add(ImportTableMap::HANDLECLASS, $this->handleclass);
|
||||||
if ($this->isColumnModified(ImportTableMap::CREATED_AT)) $criteria->add(ImportTableMap::CREATED_AT, $this->created_at);
|
if ($this->isColumnModified(ImportTableMap::CREATED_AT)) $criteria->add(ImportTableMap::CREATED_AT, $this->created_at);
|
||||||
if ($this->isColumnModified(ImportTableMap::UPDATED_AT)) $criteria->add(ImportTableMap::UPDATED_AT, $this->updated_at);
|
if ($this->isColumnModified(ImportTableMap::UPDATED_AT)) $criteria->add(ImportTableMap::UPDATED_AT, $this->updated_at);
|
||||||
|
|
||||||
@@ -1212,6 +1268,7 @@ abstract class Import implements ActiveRecordInterface
|
|||||||
{
|
{
|
||||||
$copyObj->setImportCategoryId($this->getImportCategoryId());
|
$copyObj->setImportCategoryId($this->getImportCategoryId());
|
||||||
$copyObj->setPosition($this->getPosition());
|
$copyObj->setPosition($this->getPosition());
|
||||||
|
$copyObj->setHandleclass($this->getHandleclass());
|
||||||
$copyObj->setCreatedAt($this->getCreatedAt());
|
$copyObj->setCreatedAt($this->getCreatedAt());
|
||||||
$copyObj->setUpdatedAt($this->getUpdatedAt());
|
$copyObj->setUpdatedAt($this->getUpdatedAt());
|
||||||
|
|
||||||
@@ -1556,6 +1613,7 @@ abstract class Import implements ActiveRecordInterface
|
|||||||
$this->id = null;
|
$this->id = null;
|
||||||
$this->import_category_id = null;
|
$this->import_category_id = null;
|
||||||
$this->position = null;
|
$this->position = null;
|
||||||
|
$this->handleclass = null;
|
||||||
$this->created_at = null;
|
$this->created_at = null;
|
||||||
$this->updated_at = null;
|
$this->updated_at = null;
|
||||||
$this->alreadyInSave = false;
|
$this->alreadyInSave = false;
|
||||||
|
|||||||
@@ -25,12 +25,14 @@ use Thelia\Model\Map\ImportTableMap;
|
|||||||
* @method ChildImportQuery orderById($order = Criteria::ASC) Order by the id column
|
* @method ChildImportQuery orderById($order = Criteria::ASC) Order by the id column
|
||||||
* @method ChildImportQuery orderByImportCategoryId($order = Criteria::ASC) Order by the import_category_id column
|
* @method ChildImportQuery orderByImportCategoryId($order = Criteria::ASC) Order by the import_category_id column
|
||||||
* @method ChildImportQuery orderByPosition($order = Criteria::ASC) Order by the position column
|
* @method ChildImportQuery orderByPosition($order = Criteria::ASC) Order by the position column
|
||||||
|
* @method ChildImportQuery orderByHandleclass($order = Criteria::ASC) Order by the handleClass column
|
||||||
* @method ChildImportQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
|
* @method ChildImportQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
|
||||||
* @method ChildImportQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
|
* @method ChildImportQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
|
||||||
*
|
*
|
||||||
* @method ChildImportQuery groupById() Group by the id column
|
* @method ChildImportQuery groupById() Group by the id column
|
||||||
* @method ChildImportQuery groupByImportCategoryId() Group by the import_category_id column
|
* @method ChildImportQuery groupByImportCategoryId() Group by the import_category_id column
|
||||||
* @method ChildImportQuery groupByPosition() Group by the position column
|
* @method ChildImportQuery groupByPosition() Group by the position column
|
||||||
|
* @method ChildImportQuery groupByHandleclass() Group by the handleClass column
|
||||||
* @method ChildImportQuery groupByCreatedAt() Group by the created_at column
|
* @method ChildImportQuery groupByCreatedAt() Group by the created_at column
|
||||||
* @method ChildImportQuery groupByUpdatedAt() Group by the updated_at column
|
* @method ChildImportQuery groupByUpdatedAt() Group by the updated_at column
|
||||||
*
|
*
|
||||||
@@ -52,12 +54,14 @@ use Thelia\Model\Map\ImportTableMap;
|
|||||||
* @method ChildImport findOneById(int $id) Return the first ChildImport filtered by the id column
|
* @method ChildImport findOneById(int $id) Return the first ChildImport filtered by the id column
|
||||||
* @method ChildImport findOneByImportCategoryId(int $import_category_id) Return the first ChildImport filtered by the import_category_id column
|
* @method ChildImport findOneByImportCategoryId(int $import_category_id) Return the first ChildImport filtered by the import_category_id column
|
||||||
* @method ChildImport findOneByPosition(int $position) Return the first ChildImport filtered by the position column
|
* @method ChildImport findOneByPosition(int $position) Return the first ChildImport filtered by the position column
|
||||||
|
* @method ChildImport findOneByHandleclass(string $handleClass) Return the first ChildImport filtered by the handleClass column
|
||||||
* @method ChildImport findOneByCreatedAt(string $created_at) Return the first ChildImport filtered by the created_at column
|
* @method ChildImport findOneByCreatedAt(string $created_at) Return the first ChildImport filtered by the created_at column
|
||||||
* @method ChildImport findOneByUpdatedAt(string $updated_at) Return the first ChildImport filtered by the updated_at column
|
* @method ChildImport findOneByUpdatedAt(string $updated_at) Return the first ChildImport filtered by the updated_at column
|
||||||
*
|
*
|
||||||
* @method array findById(int $id) Return ChildImport objects filtered by the id column
|
* @method array findById(int $id) Return ChildImport objects filtered by the id column
|
||||||
* @method array findByImportCategoryId(int $import_category_id) Return ChildImport objects filtered by the import_category_id column
|
* @method array findByImportCategoryId(int $import_category_id) Return ChildImport objects filtered by the import_category_id column
|
||||||
* @method array findByPosition(int $position) Return ChildImport objects filtered by the position column
|
* @method array findByPosition(int $position) Return ChildImport objects filtered by the position column
|
||||||
|
* @method array findByHandleclass(string $handleClass) Return ChildImport objects filtered by the handleClass column
|
||||||
* @method array findByCreatedAt(string $created_at) Return ChildImport objects filtered by the created_at column
|
* @method array findByCreatedAt(string $created_at) Return ChildImport objects filtered by the created_at column
|
||||||
* @method array findByUpdatedAt(string $updated_at) Return ChildImport objects filtered by the updated_at column
|
* @method array findByUpdatedAt(string $updated_at) Return ChildImport objects filtered by the updated_at column
|
||||||
*
|
*
|
||||||
@@ -148,7 +152,7 @@ abstract class ImportQuery extends ModelCriteria
|
|||||||
*/
|
*/
|
||||||
protected function findPkSimple($key, $con)
|
protected function findPkSimple($key, $con)
|
||||||
{
|
{
|
||||||
$sql = 'SELECT `ID`, `IMPORT_CATEGORY_ID`, `POSITION`, `CREATED_AT`, `UPDATED_AT` FROM `import` WHERE `ID` = :p0';
|
$sql = 'SELECT `ID`, `IMPORT_CATEGORY_ID`, `POSITION`, `HANDLECLASS`, `CREATED_AT`, `UPDATED_AT` FROM `import` WHERE `ID` = :p0';
|
||||||
try {
|
try {
|
||||||
$stmt = $con->prepare($sql);
|
$stmt = $con->prepare($sql);
|
||||||
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
|
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
|
||||||
@@ -362,6 +366,35 @@ abstract class ImportQuery extends ModelCriteria
|
|||||||
return $this->addUsingAlias(ImportTableMap::POSITION, $position, $comparison);
|
return $this->addUsingAlias(ImportTableMap::POSITION, $position, $comparison);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query on the handleClass column
|
||||||
|
*
|
||||||
|
* Example usage:
|
||||||
|
* <code>
|
||||||
|
* $query->filterByHandleclass('fooValue'); // WHERE handleClass = 'fooValue'
|
||||||
|
* $query->filterByHandleclass('%fooValue%'); // WHERE handleClass LIKE '%fooValue%'
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* @param string $handleclass The value to use as filter.
|
||||||
|
* Accepts wildcards (* and % trigger a LIKE)
|
||||||
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
|
*
|
||||||
|
* @return ChildImportQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterByHandleclass($handleclass = null, $comparison = null)
|
||||||
|
{
|
||||||
|
if (null === $comparison) {
|
||||||
|
if (is_array($handleclass)) {
|
||||||
|
$comparison = Criteria::IN;
|
||||||
|
} elseif (preg_match('/[\%\*]/', $handleclass)) {
|
||||||
|
$handleclass = str_replace('*', '%', $handleclass);
|
||||||
|
$comparison = Criteria::LIKE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->addUsingAlias(ImportTableMap::HANDLECLASS, $handleclass, $comparison);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter the query on the created_at column
|
* Filter the query on the created_at column
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
namespace Thelia\Model;
|
namespace Thelia\Model;
|
||||||
|
|
||||||
use Propel\Runtime\ActiveQuery\Criteria;
|
use Propel\Runtime\ActiveQuery\Criteria;
|
||||||
|
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||||
|
use Thelia\ImportExport\ExportHandlerInterface;
|
||||||
use Thelia\Model\Base\Export as BaseExport;
|
use Thelia\Model\Base\Export as BaseExport;
|
||||||
use Thelia\Model\Map\ExportTableMap;
|
use Thelia\Model\Map\ExportTableMap;
|
||||||
|
|
||||||
@@ -10,6 +12,7 @@ class Export extends BaseExport
|
|||||||
{
|
{
|
||||||
public function upPosition()
|
public function upPosition()
|
||||||
{
|
{
|
||||||
|
|
||||||
if (($position = $this->getPosition()) > 1) {
|
if (($position = $this->getPosition()) > 1) {
|
||||||
|
|
||||||
$previous = ExportQuery::create()
|
$previous = ExportQuery::create()
|
||||||
@@ -70,4 +73,32 @@ class Export extends BaseExport
|
|||||||
|
|
||||||
$this->setPosition($position)->save();
|
$this->setPosition($position)->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getHandleClassInstance(ContainerInterface $container)
|
||||||
|
{
|
||||||
|
$class = $this->getHandleClass();
|
||||||
|
|
||||||
|
if (!class_exists($class)) {
|
||||||
|
throw new \ErrorException(
|
||||||
|
"The class \"%class\" doesn't exist",
|
||||||
|
[
|
||||||
|
"%class" => $class
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
$instance = new $class($container);
|
||||||
|
|
||||||
|
if (!$class instanceof ExportHandlerInterface) {
|
||||||
|
throw new \ErrorException(
|
||||||
|
"The class \"%class\" must implement %interface",
|
||||||
|
[
|
||||||
|
"%class" => $class,
|
||||||
|
"%interface" => "\\Thelia\\ImportExport\\ExportHandlerInterface",
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $instance;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,9 +2,103 @@
|
|||||||
|
|
||||||
namespace Thelia\Model;
|
namespace Thelia\Model;
|
||||||
|
|
||||||
|
use Propel\Runtime\ActiveQuery\Criteria;
|
||||||
|
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||||
|
use Thelia\ImportExport\ExportHandlerInterface;
|
||||||
use Thelia\Model\Base\Import as BaseImport;
|
use Thelia\Model\Base\Import as BaseImport;
|
||||||
|
use Thelia\Model\Map\ImportTableMap;
|
||||||
|
|
||||||
class Import extends BaseImport
|
class Import extends BaseImport
|
||||||
{
|
{
|
||||||
|
public function upPosition()
|
||||||
|
{
|
||||||
|
|
||||||
|
if (($position = $this->getPosition()) > 1) {
|
||||||
|
|
||||||
|
$previous = ImportQuery::create()
|
||||||
|
->filterByPosition($position - 1)
|
||||||
|
->findOneByImportCategoryId($this->getImportCategoryId());
|
||||||
|
|
||||||
|
if (null !== $previous) {
|
||||||
|
$previous->setPosition($position)->save();
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->setPosition($position - 1)->save();
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function downPosition()
|
||||||
|
{
|
||||||
|
$max = ImportQuery::create()
|
||||||
|
->orderByPosition(Criteria::DESC)
|
||||||
|
->select(ImportTableMap::POSITION)
|
||||||
|
->findOne()
|
||||||
|
;
|
||||||
|
|
||||||
|
$count = $this->getImportCategory()->countImports();
|
||||||
|
|
||||||
|
if ($count > $max) {
|
||||||
|
$max = $count;
|
||||||
|
}
|
||||||
|
|
||||||
|
$position = $this->getPosition();
|
||||||
|
|
||||||
|
if ($position < $max) {
|
||||||
|
|
||||||
|
$next = ImportQuery::create()
|
||||||
|
->filterByPosition($position + 1)
|
||||||
|
->findOneByImportCategoryId($this->getImportCategoryId());
|
||||||
|
|
||||||
|
if (null !== $next) {
|
||||||
|
$next->setPosition($position)->save();
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->setPosition($position + 1)->save();
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function updatePosition($position)
|
||||||
|
{
|
||||||
|
$reverse = ImportQuery::create()
|
||||||
|
->findOneByPosition($position)
|
||||||
|
;
|
||||||
|
|
||||||
|
if (null !== $reverse) {
|
||||||
|
$reverse->setPosition($this->getPosition())->save();
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->setPosition($position)->save();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getHandleClassInstance(ContainerInterface $container)
|
||||||
|
{
|
||||||
|
$class = $this->getHandleClass();
|
||||||
|
|
||||||
|
if (!class_exists($class)) {
|
||||||
|
throw new \ErrorException(
|
||||||
|
"The class \"%class\" doesn't exist",
|
||||||
|
[
|
||||||
|
"%class" => $class
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
$instance = new $class($container);
|
||||||
|
|
||||||
|
if (!$class instanceof ExportHandlerInterface) {
|
||||||
|
throw new \ErrorException(
|
||||||
|
"The class \"%class\" must implement %interface",
|
||||||
|
[
|
||||||
|
"%class" => $class,
|
||||||
|
"%interface" => "\\Thelia\\ImportExport\\ExportHandlerInterface",
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $instance;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ class ExportTableMap extends TableMap
|
|||||||
/**
|
/**
|
||||||
* The total number of columns
|
* The total number of columns
|
||||||
*/
|
*/
|
||||||
const NUM_COLUMNS = 5;
|
const NUM_COLUMNS = 6;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The number of lazy-loaded columns
|
* The number of lazy-loaded columns
|
||||||
@@ -68,7 +68,7 @@ class ExportTableMap extends TableMap
|
|||||||
/**
|
/**
|
||||||
* The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS)
|
* The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS)
|
||||||
*/
|
*/
|
||||||
const NUM_HYDRATE_COLUMNS = 5;
|
const NUM_HYDRATE_COLUMNS = 6;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the column name for the ID field
|
* the column name for the ID field
|
||||||
@@ -85,6 +85,11 @@ class ExportTableMap extends TableMap
|
|||||||
*/
|
*/
|
||||||
const POSITION = 'export.POSITION';
|
const POSITION = 'export.POSITION';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the column name for the HANDLECLASS field
|
||||||
|
*/
|
||||||
|
const HANDLECLASS = 'export.HANDLECLASS';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the column name for the CREATED_AT field
|
* the column name for the CREATED_AT field
|
||||||
*/
|
*/
|
||||||
@@ -116,12 +121,12 @@ class ExportTableMap extends TableMap
|
|||||||
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||||
*/
|
*/
|
||||||
protected static $fieldNames = array (
|
protected static $fieldNames = array (
|
||||||
self::TYPE_PHPNAME => array('Id', 'ExportCategoryId', 'Position', 'CreatedAt', 'UpdatedAt', ),
|
self::TYPE_PHPNAME => array('Id', 'ExportCategoryId', 'Position', 'Handleclass', 'CreatedAt', 'UpdatedAt', ),
|
||||||
self::TYPE_STUDLYPHPNAME => array('id', 'exportCategoryId', 'position', 'createdAt', 'updatedAt', ),
|
self::TYPE_STUDLYPHPNAME => array('id', 'exportCategoryId', 'position', 'handleclass', 'createdAt', 'updatedAt', ),
|
||||||
self::TYPE_COLNAME => array(ExportTableMap::ID, ExportTableMap::EXPORT_CATEGORY_ID, ExportTableMap::POSITION, ExportTableMap::CREATED_AT, ExportTableMap::UPDATED_AT, ),
|
self::TYPE_COLNAME => array(ExportTableMap::ID, ExportTableMap::EXPORT_CATEGORY_ID, ExportTableMap::POSITION, ExportTableMap::HANDLECLASS, ExportTableMap::CREATED_AT, ExportTableMap::UPDATED_AT, ),
|
||||||
self::TYPE_RAW_COLNAME => array('ID', 'EXPORT_CATEGORY_ID', 'POSITION', 'CREATED_AT', 'UPDATED_AT', ),
|
self::TYPE_RAW_COLNAME => array('ID', 'EXPORT_CATEGORY_ID', 'POSITION', 'HANDLECLASS', 'CREATED_AT', 'UPDATED_AT', ),
|
||||||
self::TYPE_FIELDNAME => array('id', 'export_category_id', 'position', 'created_at', 'updated_at', ),
|
self::TYPE_FIELDNAME => array('id', 'export_category_id', 'position', 'handleClass', 'created_at', 'updated_at', ),
|
||||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, )
|
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, )
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -131,12 +136,12 @@ class ExportTableMap extends TableMap
|
|||||||
* e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
|
* e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
|
||||||
*/
|
*/
|
||||||
protected static $fieldKeys = array (
|
protected static $fieldKeys = array (
|
||||||
self::TYPE_PHPNAME => array('Id' => 0, 'ExportCategoryId' => 1, 'Position' => 2, 'CreatedAt' => 3, 'UpdatedAt' => 4, ),
|
self::TYPE_PHPNAME => array('Id' => 0, 'ExportCategoryId' => 1, 'Position' => 2, 'Handleclass' => 3, 'CreatedAt' => 4, 'UpdatedAt' => 5, ),
|
||||||
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'exportCategoryId' => 1, 'position' => 2, 'createdAt' => 3, 'updatedAt' => 4, ),
|
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'exportCategoryId' => 1, 'position' => 2, 'handleclass' => 3, 'createdAt' => 4, 'updatedAt' => 5, ),
|
||||||
self::TYPE_COLNAME => array(ExportTableMap::ID => 0, ExportTableMap::EXPORT_CATEGORY_ID => 1, ExportTableMap::POSITION => 2, ExportTableMap::CREATED_AT => 3, ExportTableMap::UPDATED_AT => 4, ),
|
self::TYPE_COLNAME => array(ExportTableMap::ID => 0, ExportTableMap::EXPORT_CATEGORY_ID => 1, ExportTableMap::POSITION => 2, ExportTableMap::HANDLECLASS => 3, ExportTableMap::CREATED_AT => 4, ExportTableMap::UPDATED_AT => 5, ),
|
||||||
self::TYPE_RAW_COLNAME => array('ID' => 0, 'EXPORT_CATEGORY_ID' => 1, 'POSITION' => 2, 'CREATED_AT' => 3, 'UPDATED_AT' => 4, ),
|
self::TYPE_RAW_COLNAME => array('ID' => 0, 'EXPORT_CATEGORY_ID' => 1, 'POSITION' => 2, 'HANDLECLASS' => 3, 'CREATED_AT' => 4, 'UPDATED_AT' => 5, ),
|
||||||
self::TYPE_FIELDNAME => array('id' => 0, 'export_category_id' => 1, 'position' => 2, 'created_at' => 3, 'updated_at' => 4, ),
|
self::TYPE_FIELDNAME => array('id' => 0, 'export_category_id' => 1, 'position' => 2, 'handleClass' => 3, 'created_at' => 4, 'updated_at' => 5, ),
|
||||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, )
|
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, )
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -158,6 +163,7 @@ class ExportTableMap extends TableMap
|
|||||||
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
|
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
|
||||||
$this->addForeignKey('EXPORT_CATEGORY_ID', 'ExportCategoryId', 'INTEGER', 'export_category', 'ID', true, null, null);
|
$this->addForeignKey('EXPORT_CATEGORY_ID', 'ExportCategoryId', 'INTEGER', 'export_category', 'ID', true, null, null);
|
||||||
$this->addColumn('POSITION', 'Position', 'INTEGER', true, null, null);
|
$this->addColumn('POSITION', 'Position', 'INTEGER', true, null, null);
|
||||||
|
$this->addColumn('HANDLECLASS', 'Handleclass', 'CLOB', true, null, null);
|
||||||
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
|
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
|
||||||
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
|
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
|
||||||
} // initialize()
|
} // initialize()
|
||||||
@@ -335,12 +341,14 @@ class ExportTableMap extends TableMap
|
|||||||
$criteria->addSelectColumn(ExportTableMap::ID);
|
$criteria->addSelectColumn(ExportTableMap::ID);
|
||||||
$criteria->addSelectColumn(ExportTableMap::EXPORT_CATEGORY_ID);
|
$criteria->addSelectColumn(ExportTableMap::EXPORT_CATEGORY_ID);
|
||||||
$criteria->addSelectColumn(ExportTableMap::POSITION);
|
$criteria->addSelectColumn(ExportTableMap::POSITION);
|
||||||
|
$criteria->addSelectColumn(ExportTableMap::HANDLECLASS);
|
||||||
$criteria->addSelectColumn(ExportTableMap::CREATED_AT);
|
$criteria->addSelectColumn(ExportTableMap::CREATED_AT);
|
||||||
$criteria->addSelectColumn(ExportTableMap::UPDATED_AT);
|
$criteria->addSelectColumn(ExportTableMap::UPDATED_AT);
|
||||||
} else {
|
} else {
|
||||||
$criteria->addSelectColumn($alias . '.ID');
|
$criteria->addSelectColumn($alias . '.ID');
|
||||||
$criteria->addSelectColumn($alias . '.EXPORT_CATEGORY_ID');
|
$criteria->addSelectColumn($alias . '.EXPORT_CATEGORY_ID');
|
||||||
$criteria->addSelectColumn($alias . '.POSITION');
|
$criteria->addSelectColumn($alias . '.POSITION');
|
||||||
|
$criteria->addSelectColumn($alias . '.HANDLECLASS');
|
||||||
$criteria->addSelectColumn($alias . '.CREATED_AT');
|
$criteria->addSelectColumn($alias . '.CREATED_AT');
|
||||||
$criteria->addSelectColumn($alias . '.UPDATED_AT');
|
$criteria->addSelectColumn($alias . '.UPDATED_AT');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ class ImportTableMap extends TableMap
|
|||||||
/**
|
/**
|
||||||
* The total number of columns
|
* The total number of columns
|
||||||
*/
|
*/
|
||||||
const NUM_COLUMNS = 5;
|
const NUM_COLUMNS = 6;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The number of lazy-loaded columns
|
* The number of lazy-loaded columns
|
||||||
@@ -68,7 +68,7 @@ class ImportTableMap extends TableMap
|
|||||||
/**
|
/**
|
||||||
* The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS)
|
* The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS)
|
||||||
*/
|
*/
|
||||||
const NUM_HYDRATE_COLUMNS = 5;
|
const NUM_HYDRATE_COLUMNS = 6;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the column name for the ID field
|
* the column name for the ID field
|
||||||
@@ -85,6 +85,11 @@ class ImportTableMap extends TableMap
|
|||||||
*/
|
*/
|
||||||
const POSITION = 'import.POSITION';
|
const POSITION = 'import.POSITION';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the column name for the HANDLECLASS field
|
||||||
|
*/
|
||||||
|
const HANDLECLASS = 'import.HANDLECLASS';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the column name for the CREATED_AT field
|
* the column name for the CREATED_AT field
|
||||||
*/
|
*/
|
||||||
@@ -116,12 +121,12 @@ class ImportTableMap extends TableMap
|
|||||||
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||||
*/
|
*/
|
||||||
protected static $fieldNames = array (
|
protected static $fieldNames = array (
|
||||||
self::TYPE_PHPNAME => array('Id', 'ImportCategoryId', 'Position', 'CreatedAt', 'UpdatedAt', ),
|
self::TYPE_PHPNAME => array('Id', 'ImportCategoryId', 'Position', 'Handleclass', 'CreatedAt', 'UpdatedAt', ),
|
||||||
self::TYPE_STUDLYPHPNAME => array('id', 'importCategoryId', 'position', 'createdAt', 'updatedAt', ),
|
self::TYPE_STUDLYPHPNAME => array('id', 'importCategoryId', 'position', 'handleclass', 'createdAt', 'updatedAt', ),
|
||||||
self::TYPE_COLNAME => array(ImportTableMap::ID, ImportTableMap::IMPORT_CATEGORY_ID, ImportTableMap::POSITION, ImportTableMap::CREATED_AT, ImportTableMap::UPDATED_AT, ),
|
self::TYPE_COLNAME => array(ImportTableMap::ID, ImportTableMap::IMPORT_CATEGORY_ID, ImportTableMap::POSITION, ImportTableMap::HANDLECLASS, ImportTableMap::CREATED_AT, ImportTableMap::UPDATED_AT, ),
|
||||||
self::TYPE_RAW_COLNAME => array('ID', 'IMPORT_CATEGORY_ID', 'POSITION', 'CREATED_AT', 'UPDATED_AT', ),
|
self::TYPE_RAW_COLNAME => array('ID', 'IMPORT_CATEGORY_ID', 'POSITION', 'HANDLECLASS', 'CREATED_AT', 'UPDATED_AT', ),
|
||||||
self::TYPE_FIELDNAME => array('id', 'import_category_id', 'position', 'created_at', 'updated_at', ),
|
self::TYPE_FIELDNAME => array('id', 'import_category_id', 'position', 'handleClass', 'created_at', 'updated_at', ),
|
||||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, )
|
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, )
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -131,12 +136,12 @@ class ImportTableMap extends TableMap
|
|||||||
* e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
|
* e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
|
||||||
*/
|
*/
|
||||||
protected static $fieldKeys = array (
|
protected static $fieldKeys = array (
|
||||||
self::TYPE_PHPNAME => array('Id' => 0, 'ImportCategoryId' => 1, 'Position' => 2, 'CreatedAt' => 3, 'UpdatedAt' => 4, ),
|
self::TYPE_PHPNAME => array('Id' => 0, 'ImportCategoryId' => 1, 'Position' => 2, 'Handleclass' => 3, 'CreatedAt' => 4, 'UpdatedAt' => 5, ),
|
||||||
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'importCategoryId' => 1, 'position' => 2, 'createdAt' => 3, 'updatedAt' => 4, ),
|
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'importCategoryId' => 1, 'position' => 2, 'handleclass' => 3, 'createdAt' => 4, 'updatedAt' => 5, ),
|
||||||
self::TYPE_COLNAME => array(ImportTableMap::ID => 0, ImportTableMap::IMPORT_CATEGORY_ID => 1, ImportTableMap::POSITION => 2, ImportTableMap::CREATED_AT => 3, ImportTableMap::UPDATED_AT => 4, ),
|
self::TYPE_COLNAME => array(ImportTableMap::ID => 0, ImportTableMap::IMPORT_CATEGORY_ID => 1, ImportTableMap::POSITION => 2, ImportTableMap::HANDLECLASS => 3, ImportTableMap::CREATED_AT => 4, ImportTableMap::UPDATED_AT => 5, ),
|
||||||
self::TYPE_RAW_COLNAME => array('ID' => 0, 'IMPORT_CATEGORY_ID' => 1, 'POSITION' => 2, 'CREATED_AT' => 3, 'UPDATED_AT' => 4, ),
|
self::TYPE_RAW_COLNAME => array('ID' => 0, 'IMPORT_CATEGORY_ID' => 1, 'POSITION' => 2, 'HANDLECLASS' => 3, 'CREATED_AT' => 4, 'UPDATED_AT' => 5, ),
|
||||||
self::TYPE_FIELDNAME => array('id' => 0, 'import_category_id' => 1, 'position' => 2, 'created_at' => 3, 'updated_at' => 4, ),
|
self::TYPE_FIELDNAME => array('id' => 0, 'import_category_id' => 1, 'position' => 2, 'handleClass' => 3, 'created_at' => 4, 'updated_at' => 5, ),
|
||||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, )
|
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, )
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -158,6 +163,7 @@ class ImportTableMap extends TableMap
|
|||||||
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
|
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
|
||||||
$this->addForeignKey('IMPORT_CATEGORY_ID', 'ImportCategoryId', 'INTEGER', 'import_category', 'ID', true, null, null);
|
$this->addForeignKey('IMPORT_CATEGORY_ID', 'ImportCategoryId', 'INTEGER', 'import_category', 'ID', true, null, null);
|
||||||
$this->addColumn('POSITION', 'Position', 'INTEGER', true, null, null);
|
$this->addColumn('POSITION', 'Position', 'INTEGER', true, null, null);
|
||||||
|
$this->addColumn('HANDLECLASS', 'Handleclass', 'CLOB', true, null, null);
|
||||||
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
|
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
|
||||||
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
|
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
|
||||||
} // initialize()
|
} // initialize()
|
||||||
@@ -335,12 +341,14 @@ class ImportTableMap extends TableMap
|
|||||||
$criteria->addSelectColumn(ImportTableMap::ID);
|
$criteria->addSelectColumn(ImportTableMap::ID);
|
||||||
$criteria->addSelectColumn(ImportTableMap::IMPORT_CATEGORY_ID);
|
$criteria->addSelectColumn(ImportTableMap::IMPORT_CATEGORY_ID);
|
||||||
$criteria->addSelectColumn(ImportTableMap::POSITION);
|
$criteria->addSelectColumn(ImportTableMap::POSITION);
|
||||||
|
$criteria->addSelectColumn(ImportTableMap::HANDLECLASS);
|
||||||
$criteria->addSelectColumn(ImportTableMap::CREATED_AT);
|
$criteria->addSelectColumn(ImportTableMap::CREATED_AT);
|
||||||
$criteria->addSelectColumn(ImportTableMap::UPDATED_AT);
|
$criteria->addSelectColumn(ImportTableMap::UPDATED_AT);
|
||||||
} else {
|
} else {
|
||||||
$criteria->addSelectColumn($alias . '.ID');
|
$criteria->addSelectColumn($alias . '.ID');
|
||||||
$criteria->addSelectColumn($alias . '.IMPORT_CATEGORY_ID');
|
$criteria->addSelectColumn($alias . '.IMPORT_CATEGORY_ID');
|
||||||
$criteria->addSelectColumn($alias . '.POSITION');
|
$criteria->addSelectColumn($alias . '.POSITION');
|
||||||
|
$criteria->addSelectColumn($alias . '.HANDLECLASS');
|
||||||
$criteria->addSelectColumn($alias . '.CREATED_AT');
|
$criteria->addSelectColumn($alias . '.CREATED_AT');
|
||||||
$criteria->addSelectColumn($alias . '.UPDATED_AT');
|
$criteria->addSelectColumn($alias . '.UPDATED_AT');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1536,6 +1536,7 @@
|
|||||||
<column name="description" type="CLOB" />
|
<column name="description" type="CLOB" />
|
||||||
<column name="import_category_id" type="INTEGER" required="true" />
|
<column name="import_category_id" type="INTEGER" required="true" />
|
||||||
<column name="position" type="INTEGER" required="true" />
|
<column name="position" type="INTEGER" required="true" />
|
||||||
|
<column name="handleClass" type="CLOB" required="true"/>
|
||||||
<foreign-key foreignTable="import_category" name="fk_import_import_category_id" onDelete="CASCADE" onUpdate="RESTRICT">
|
<foreign-key foreignTable="import_category" name="fk_import_import_category_id" onDelete="CASCADE" onUpdate="RESTRICT">
|
||||||
<reference foreign="id" local="import_category_id" />
|
<reference foreign="id" local="import_category_id" />
|
||||||
</foreign-key>
|
</foreign-key>
|
||||||
@@ -1553,6 +1554,7 @@
|
|||||||
<column name="description" type="CLOB" />
|
<column name="description" type="CLOB" />
|
||||||
<column name="export_category_id" type="INTEGER" required="true" />
|
<column name="export_category_id" type="INTEGER" required="true" />
|
||||||
<column name="position" type="INTEGER" required="true" />
|
<column name="position" type="INTEGER" required="true" />
|
||||||
|
<column name="handleClass" type="CLOB" required="true"/>
|
||||||
<foreign-key foreignTable="export_category" name="fk_export_export_category_id" onDelete="CASCADE" onUpdate="RESTRICT">
|
<foreign-key foreignTable="export_category" name="fk_export_export_category_id" onDelete="CASCADE" onUpdate="RESTRICT">
|
||||||
<reference foreign="id" local="export_category_id" />
|
<reference foreign="id" local="export_category_id" />
|
||||||
</foreign-key>
|
</foreign-key>
|
||||||
|
|||||||
@@ -1914,6 +1914,7 @@ CREATE TABLE `import`
|
|||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
`import_category_id` INTEGER NOT NULL,
|
`import_category_id` INTEGER NOT NULL,
|
||||||
`position` INTEGER NOT NULL,
|
`position` INTEGER NOT NULL,
|
||||||
|
`handleClass` LONGTEXT NOT NULL,
|
||||||
`created_at` DATETIME,
|
`created_at` DATETIME,
|
||||||
`updated_at` DATETIME,
|
`updated_at` DATETIME,
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
@@ -1936,6 +1937,7 @@ CREATE TABLE `export`
|
|||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
`export_category_id` INTEGER NOT NULL,
|
`export_category_id` INTEGER NOT NULL,
|
||||||
`position` INTEGER NOT NULL,
|
`position` INTEGER NOT NULL,
|
||||||
|
`handleClass` LONGTEXT NOT NULL,
|
||||||
`created_at` DATETIME,
|
`created_at` DATETIME,
|
||||||
`updated_at` DATETIME,
|
`updated_at` DATETIME,
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
|
|||||||
Reference in New Issue
Block a user