GI-216 La tabla GMAIL_RELABELING no se genera con la columna LABELING_ID autoincremental

This commit is contained in:
Dante
2015-12-21 10:35:12 -04:00
parent aa69313129
commit ab63620f9b
5 changed files with 15 additions and 14 deletions

View File

@@ -342,6 +342,7 @@ class labelsGmail
{
$labelingQueue = new GmailRelabeling();
$labelingQueue->setCreateDate(date('Y-m-d H:i:s'));
$labelingQueue->setLabelingUid(G::generateUniqueID());
$labelingQueue->setAppUid($caseId);
$labelingQueue->setDelIndex($index);
$labelingQueue->setCurrentLastIndex($actualLastIndex);
@@ -354,7 +355,7 @@ class labelsGmail
{
$c = new \Criteria( 'workflow' );
$c->add( \GmailRelabelingPeer::STATUS, 'pending' );
$c->addAscendingOrderByColumn('LABELING_UID');
$c->addAscendingOrderByColumn('CREATE_DATE');
$list = \GmailRelabelingPeer::doSelect($c);
foreach($list as $task) {
try {

View File

@@ -65,7 +65,7 @@ class GmailRelabelingMapBuilder
$tMap->setUseIdGenerator(false);
$tMap->addPrimaryKey('LABELING_UID', 'LabelingUid', 'int', CreoleTypes::INTEGER, true, null);
$tMap->addPrimaryKey('LABELING_UID', 'LabelingUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('CREATE_DATE', 'CreateDate', 'int', CreoleTypes::TIMESTAMP, true, null);

View File

@@ -29,7 +29,7 @@ abstract class BaseGmailRelabeling extends BaseObject implements Persistent
/**
* The value for the labeling_uid field.
* @var int
* @var string
*/
protected $labeling_uid;
@@ -92,7 +92,7 @@ abstract class BaseGmailRelabeling extends BaseObject implements Persistent
/**
* Get the [labeling_uid] column value.
*
* @return int
* @return string
*/
public function getLabelingUid()
{
@@ -201,16 +201,16 @@ abstract class BaseGmailRelabeling extends BaseObject implements Persistent
/**
* Set the value of [labeling_uid] column.
*
* @param int $v new value
* @param string $v new value
* @return void
*/
public function setLabelingUid($v)
{
// Since the native PHP type for this column is integer,
// we will cast the input value to an int (if it is not).
if ($v !== null && !is_int($v) && is_numeric($v)) {
$v = (int) $v;
// Since the native PHP type for this column is string,
// we will cast the input to a string (if it is not).
if ($v !== null && !is_string($v)) {
$v = (string) $v;
}
if ($this->labeling_uid !== $v) {
@@ -398,7 +398,7 @@ abstract class BaseGmailRelabeling extends BaseObject implements Persistent
{
try {
$this->labeling_uid = $rs->getInt($startcol + 0);
$this->labeling_uid = $rs->getString($startcol + 0);
$this->create_date = $rs->getTimestamp($startcol + 1, null);
@@ -851,7 +851,7 @@ abstract class BaseGmailRelabeling extends BaseObject implements Persistent
/**
* Returns the primary key for this object (row).
* @return int
* @return string
*/
public function getPrimaryKey()
{
@@ -861,7 +861,7 @@ abstract class BaseGmailRelabeling extends BaseObject implements Persistent
/**
* Generic method to set the primary key (labeling_uid column).
*
* @param int $key Primary key.
* @param string $key Primary key.
* @return void
*/
public function setPrimaryKey($key)

View File

@@ -5261,7 +5261,7 @@
<parameter name="Create_options" value="" />
<parameter name="Comment" value="Task for label relabaling"/>
</vendor>
<column name="LABELING_UID" type="INTEGER" required="true" autoIncrement="true" primaryKey="true"/>
<column name="LABELING_UID" type="VARCHAR" size="32" required="true" primaryKey="true"/>
<column name="CREATE_DATE" type="TIMESTAMP" required="true"/>
<column name="APP_UID" type="VARCHAR" size="32" required="true" default=""/>
<column name="DEL_INDEX" type="INTEGER" required="true" default="0"/>

View File

@@ -2938,7 +2938,7 @@ CREATE TABLE `NOTIFICATION_DEVICE`
#-----------------------------------------------------------------------------
CREATE TABLE `GMAIL_RELABELING` (
`LABELING_ID` INTEGER NOT NULL AUTO_INCREMENT,
`LABELING_ID` INTEGER NOT NULL AUTO_INCREMENT,
`CREATE_DATE` DATETIME NOT NULL DEFAULT '',
`APP_UID` VARCHAR(32) NOT NULL DEFAULT '',
`DEL_INDEX` INT(11) NOT NULL DEFAULT '0',