SAAS-1058: Podcast table schema
Add additional podcast table column - type
This commit is contained in:
parent
28493497fd
commit
1a26679357
6 changed files with 132 additions and 16 deletions
|
@ -46,6 +46,7 @@ class PodcastTableMap extends TableMap
|
||||||
$this->addColumn('description', 'DbDescription', 'VARCHAR', false, 512, null);
|
$this->addColumn('description', 'DbDescription', 'VARCHAR', false, 512, null);
|
||||||
$this->addColumn('auto_ingest', 'DbAutoIngest', 'BOOLEAN', true, null, false);
|
$this->addColumn('auto_ingest', 'DbAutoIngest', 'BOOLEAN', true, null, false);
|
||||||
$this->addForeignKey('owner', 'DbOwner', 'INTEGER', 'cc_subjs', 'id', false, null, null);
|
$this->addForeignKey('owner', 'DbOwner', 'INTEGER', 'cc_subjs', 'id', false, null, null);
|
||||||
|
$this->addColumn('type', 'DbType', 'INTEGER', true, null, 1);
|
||||||
// validators
|
// validators
|
||||||
} // initialize()
|
} // initialize()
|
||||||
|
|
||||||
|
|
|
@ -72,6 +72,13 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
||||||
*/
|
*/
|
||||||
protected $owner;
|
protected $owner;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The value for the type field.
|
||||||
|
* Note: this column has a database default value of: 1
|
||||||
|
* @var int
|
||||||
|
*/
|
||||||
|
protected $type;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var CcSubjs
|
* @var CcSubjs
|
||||||
*/
|
*/
|
||||||
|
@ -118,6 +125,7 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
||||||
public function applyDefaultValues()
|
public function applyDefaultValues()
|
||||||
{
|
{
|
||||||
$this->auto_ingest = false;
|
$this->auto_ingest = false;
|
||||||
|
$this->type = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -207,6 +215,17 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
||||||
return $this->owner;
|
return $this->owner;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the [type] column value.
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
|
public function getDbType()
|
||||||
|
{
|
||||||
|
|
||||||
|
return $this->type;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the value of [id] column.
|
* Set the value of [id] column.
|
||||||
*
|
*
|
||||||
|
@ -366,6 +385,27 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
||||||
return $this;
|
return $this;
|
||||||
} // setDbOwner()
|
} // setDbOwner()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of [type] column.
|
||||||
|
*
|
||||||
|
* @param int $v new value
|
||||||
|
* @return Podcast The current object (for fluent API support)
|
||||||
|
*/
|
||||||
|
public function setDbType($v)
|
||||||
|
{
|
||||||
|
if ($v !== null && is_numeric($v)) {
|
||||||
|
$v = (int) $v;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->type !== $v) {
|
||||||
|
$this->type = $v;
|
||||||
|
$this->modifiedColumns[] = PodcastPeer::TYPE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
} // setDbType()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates whether the columns in this object are only set to default values.
|
* Indicates whether the columns in this object are only set to default values.
|
||||||
*
|
*
|
||||||
|
@ -380,6 +420,10 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($this->type !== 1) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// otherwise, everything was equal, so return true
|
// otherwise, everything was equal, so return true
|
||||||
return true;
|
return true;
|
||||||
} // hasOnlyDefaultValues()
|
} // hasOnlyDefaultValues()
|
||||||
|
@ -409,6 +453,7 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
||||||
$this->description = ($row[$startcol + 4] !== null) ? (string) $row[$startcol + 4] : null;
|
$this->description = ($row[$startcol + 4] !== null) ? (string) $row[$startcol + 4] : null;
|
||||||
$this->auto_ingest = ($row[$startcol + 5] !== null) ? (boolean) $row[$startcol + 5] : null;
|
$this->auto_ingest = ($row[$startcol + 5] !== null) ? (boolean) $row[$startcol + 5] : null;
|
||||||
$this->owner = ($row[$startcol + 6] !== null) ? (int) $row[$startcol + 6] : null;
|
$this->owner = ($row[$startcol + 6] !== null) ? (int) $row[$startcol + 6] : null;
|
||||||
|
$this->type = ($row[$startcol + 7] !== null) ? (int) $row[$startcol + 7] : null;
|
||||||
$this->resetModified();
|
$this->resetModified();
|
||||||
|
|
||||||
$this->setNew(false);
|
$this->setNew(false);
|
||||||
|
@ -418,7 +463,7 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
||||||
}
|
}
|
||||||
$this->postHydrate($row, $startcol, $rehydrate);
|
$this->postHydrate($row, $startcol, $rehydrate);
|
||||||
|
|
||||||
return $startcol + 7; // 7 = PodcastPeer::NUM_HYDRATE_COLUMNS.
|
return $startcol + 8; // 8 = PodcastPeer::NUM_HYDRATE_COLUMNS.
|
||||||
|
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
throw new PropelException("Error populating Podcast object", $e);
|
throw new PropelException("Error populating Podcast object", $e);
|
||||||
|
@ -696,6 +741,9 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
||||||
if ($this->isColumnModified(PodcastPeer::OWNER)) {
|
if ($this->isColumnModified(PodcastPeer::OWNER)) {
|
||||||
$modifiedColumns[':p' . $index++] = '"owner"';
|
$modifiedColumns[':p' . $index++] = '"owner"';
|
||||||
}
|
}
|
||||||
|
if ($this->isColumnModified(PodcastPeer::TYPE)) {
|
||||||
|
$modifiedColumns[':p' . $index++] = '"type"';
|
||||||
|
}
|
||||||
|
|
||||||
$sql = sprintf(
|
$sql = sprintf(
|
||||||
'INSERT INTO "podcast" (%s) VALUES (%s)',
|
'INSERT INTO "podcast" (%s) VALUES (%s)',
|
||||||
|
@ -728,6 +776,9 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
||||||
case '"owner"':
|
case '"owner"':
|
||||||
$stmt->bindValue($identifier, $this->owner, PDO::PARAM_INT);
|
$stmt->bindValue($identifier, $this->owner, PDO::PARAM_INT);
|
||||||
break;
|
break;
|
||||||
|
case '"type"':
|
||||||
|
$stmt->bindValue($identifier, $this->type, PDO::PARAM_INT);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
|
@ -896,6 +947,9 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
||||||
case 6:
|
case 6:
|
||||||
return $this->getDbOwner();
|
return $this->getDbOwner();
|
||||||
break;
|
break;
|
||||||
|
case 7:
|
||||||
|
return $this->getDbType();
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
break;
|
break;
|
||||||
|
@ -932,6 +986,7 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
||||||
$keys[4] => $this->getDbDescription(),
|
$keys[4] => $this->getDbDescription(),
|
||||||
$keys[5] => $this->getDbAutoIngest(),
|
$keys[5] => $this->getDbAutoIngest(),
|
||||||
$keys[6] => $this->getDbOwner(),
|
$keys[6] => $this->getDbOwner(),
|
||||||
|
$keys[7] => $this->getDbType(),
|
||||||
);
|
);
|
||||||
$virtualColumns = $this->virtualColumns;
|
$virtualColumns = $this->virtualColumns;
|
||||||
foreach ($virtualColumns as $key => $virtualColumn) {
|
foreach ($virtualColumns as $key => $virtualColumn) {
|
||||||
|
@ -1000,6 +1055,9 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
||||||
case 6:
|
case 6:
|
||||||
$this->setDbOwner($value);
|
$this->setDbOwner($value);
|
||||||
break;
|
break;
|
||||||
|
case 7:
|
||||||
|
$this->setDbType($value);
|
||||||
|
break;
|
||||||
} // switch()
|
} // switch()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1031,6 +1089,7 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
||||||
if (array_key_exists($keys[4], $arr)) $this->setDbDescription($arr[$keys[4]]);
|
if (array_key_exists($keys[4], $arr)) $this->setDbDescription($arr[$keys[4]]);
|
||||||
if (array_key_exists($keys[5], $arr)) $this->setDbAutoIngest($arr[$keys[5]]);
|
if (array_key_exists($keys[5], $arr)) $this->setDbAutoIngest($arr[$keys[5]]);
|
||||||
if (array_key_exists($keys[6], $arr)) $this->setDbOwner($arr[$keys[6]]);
|
if (array_key_exists($keys[6], $arr)) $this->setDbOwner($arr[$keys[6]]);
|
||||||
|
if (array_key_exists($keys[7], $arr)) $this->setDbType($arr[$keys[7]]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1049,6 +1108,7 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
||||||
if ($this->isColumnModified(PodcastPeer::DESCRIPTION)) $criteria->add(PodcastPeer::DESCRIPTION, $this->description);
|
if ($this->isColumnModified(PodcastPeer::DESCRIPTION)) $criteria->add(PodcastPeer::DESCRIPTION, $this->description);
|
||||||
if ($this->isColumnModified(PodcastPeer::AUTO_INGEST)) $criteria->add(PodcastPeer::AUTO_INGEST, $this->auto_ingest);
|
if ($this->isColumnModified(PodcastPeer::AUTO_INGEST)) $criteria->add(PodcastPeer::AUTO_INGEST, $this->auto_ingest);
|
||||||
if ($this->isColumnModified(PodcastPeer::OWNER)) $criteria->add(PodcastPeer::OWNER, $this->owner);
|
if ($this->isColumnModified(PodcastPeer::OWNER)) $criteria->add(PodcastPeer::OWNER, $this->owner);
|
||||||
|
if ($this->isColumnModified(PodcastPeer::TYPE)) $criteria->add(PodcastPeer::TYPE, $this->type);
|
||||||
|
|
||||||
return $criteria;
|
return $criteria;
|
||||||
}
|
}
|
||||||
|
@ -1118,6 +1178,7 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
||||||
$copyObj->setDbDescription($this->getDbDescription());
|
$copyObj->setDbDescription($this->getDbDescription());
|
||||||
$copyObj->setDbAutoIngest($this->getDbAutoIngest());
|
$copyObj->setDbAutoIngest($this->getDbAutoIngest());
|
||||||
$copyObj->setDbOwner($this->getDbOwner());
|
$copyObj->setDbOwner($this->getDbOwner());
|
||||||
|
$copyObj->setDbType($this->getDbType());
|
||||||
|
|
||||||
if ($deepCopy && !$this->startCopy) {
|
if ($deepCopy && !$this->startCopy) {
|
||||||
// important: temporarily setNew(false) because this affects the behavior of
|
// important: temporarily setNew(false) because this affects the behavior of
|
||||||
|
@ -1512,6 +1573,7 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
||||||
$this->description = null;
|
$this->description = null;
|
||||||
$this->auto_ingest = null;
|
$this->auto_ingest = null;
|
||||||
$this->owner = null;
|
$this->owner = null;
|
||||||
|
$this->type = null;
|
||||||
$this->alreadyInSave = false;
|
$this->alreadyInSave = false;
|
||||||
$this->alreadyInValidation = false;
|
$this->alreadyInValidation = false;
|
||||||
$this->alreadyInClearAllReferencesDeep = false;
|
$this->alreadyInClearAllReferencesDeep = false;
|
||||||
|
|
|
@ -24,13 +24,13 @@ abstract class BasePodcastPeer
|
||||||
const TM_CLASS = 'PodcastTableMap';
|
const TM_CLASS = 'PodcastTableMap';
|
||||||
|
|
||||||
/** The total number of columns. */
|
/** The total number of columns. */
|
||||||
const NUM_COLUMNS = 7;
|
const NUM_COLUMNS = 8;
|
||||||
|
|
||||||
/** The number of lazy-loaded columns. */
|
/** The number of lazy-loaded columns. */
|
||||||
const NUM_LAZY_LOAD_COLUMNS = 0;
|
const NUM_LAZY_LOAD_COLUMNS = 0;
|
||||||
|
|
||||||
/** 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 = 7;
|
const NUM_HYDRATE_COLUMNS = 8;
|
||||||
|
|
||||||
/** the column name for the id field */
|
/** the column name for the id field */
|
||||||
const ID = 'podcast.id';
|
const ID = 'podcast.id';
|
||||||
|
@ -53,6 +53,9 @@ abstract class BasePodcastPeer
|
||||||
/** the column name for the owner field */
|
/** the column name for the owner field */
|
||||||
const OWNER = 'podcast.owner';
|
const OWNER = 'podcast.owner';
|
||||||
|
|
||||||
|
/** the column name for the type field */
|
||||||
|
const TYPE = 'podcast.type';
|
||||||
|
|
||||||
/** The default string format for model objects of the related table **/
|
/** The default string format for model objects of the related table **/
|
||||||
const DEFAULT_STRING_FORMAT = 'YAML';
|
const DEFAULT_STRING_FORMAT = 'YAML';
|
||||||
|
|
||||||
|
@ -72,12 +75,12 @@ abstract class BasePodcastPeer
|
||||||
* e.g. PodcastPeer::$fieldNames[PodcastPeer::TYPE_PHPNAME][0] = 'Id'
|
* e.g. PodcastPeer::$fieldNames[PodcastPeer::TYPE_PHPNAME][0] = 'Id'
|
||||||
*/
|
*/
|
||||||
protected static $fieldNames = array (
|
protected static $fieldNames = array (
|
||||||
BasePeer::TYPE_PHPNAME => array ('DbId', 'DbUrl', 'DbTitle', 'DbCreator', 'DbDescription', 'DbAutoIngest', 'DbOwner', ),
|
BasePeer::TYPE_PHPNAME => array ('DbId', 'DbUrl', 'DbTitle', 'DbCreator', 'DbDescription', 'DbAutoIngest', 'DbOwner', 'DbType', ),
|
||||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbUrl', 'dbTitle', 'dbCreator', 'dbDescription', 'dbAutoIngest', 'dbOwner', ),
|
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbUrl', 'dbTitle', 'dbCreator', 'dbDescription', 'dbAutoIngest', 'dbOwner', 'dbType', ),
|
||||||
BasePeer::TYPE_COLNAME => array (PodcastPeer::ID, PodcastPeer::URL, PodcastPeer::TITLE, PodcastPeer::CREATOR, PodcastPeer::DESCRIPTION, PodcastPeer::AUTO_INGEST, PodcastPeer::OWNER, ),
|
BasePeer::TYPE_COLNAME => array (PodcastPeer::ID, PodcastPeer::URL, PodcastPeer::TITLE, PodcastPeer::CREATOR, PodcastPeer::DESCRIPTION, PodcastPeer::AUTO_INGEST, PodcastPeer::OWNER, PodcastPeer::TYPE, ),
|
||||||
BasePeer::TYPE_RAW_COLNAME => array ('ID', 'URL', 'TITLE', 'CREATOR', 'DESCRIPTION', 'AUTO_INGEST', 'OWNER', ),
|
BasePeer::TYPE_RAW_COLNAME => array ('ID', 'URL', 'TITLE', 'CREATOR', 'DESCRIPTION', 'AUTO_INGEST', 'OWNER', 'TYPE', ),
|
||||||
BasePeer::TYPE_FIELDNAME => array ('id', 'url', 'title', 'creator', 'description', 'auto_ingest', 'owner', ),
|
BasePeer::TYPE_FIELDNAME => array ('id', 'url', 'title', 'creator', 'description', 'auto_ingest', 'owner', 'type', ),
|
||||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, )
|
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, )
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -87,12 +90,12 @@ abstract class BasePodcastPeer
|
||||||
* e.g. PodcastPeer::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
|
* e.g. PodcastPeer::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
|
||||||
*/
|
*/
|
||||||
protected static $fieldKeys = array (
|
protected static $fieldKeys = array (
|
||||||
BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbUrl' => 1, 'DbTitle' => 2, 'DbCreator' => 3, 'DbDescription' => 4, 'DbAutoIngest' => 5, 'DbOwner' => 6, ),
|
BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbUrl' => 1, 'DbTitle' => 2, 'DbCreator' => 3, 'DbDescription' => 4, 'DbAutoIngest' => 5, 'DbOwner' => 6, 'DbType' => 7, ),
|
||||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbUrl' => 1, 'dbTitle' => 2, 'dbCreator' => 3, 'dbDescription' => 4, 'dbAutoIngest' => 5, 'dbOwner' => 6, ),
|
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbUrl' => 1, 'dbTitle' => 2, 'dbCreator' => 3, 'dbDescription' => 4, 'dbAutoIngest' => 5, 'dbOwner' => 6, 'dbType' => 7, ),
|
||||||
BasePeer::TYPE_COLNAME => array (PodcastPeer::ID => 0, PodcastPeer::URL => 1, PodcastPeer::TITLE => 2, PodcastPeer::CREATOR => 3, PodcastPeer::DESCRIPTION => 4, PodcastPeer::AUTO_INGEST => 5, PodcastPeer::OWNER => 6, ),
|
BasePeer::TYPE_COLNAME => array (PodcastPeer::ID => 0, PodcastPeer::URL => 1, PodcastPeer::TITLE => 2, PodcastPeer::CREATOR => 3, PodcastPeer::DESCRIPTION => 4, PodcastPeer::AUTO_INGEST => 5, PodcastPeer::OWNER => 6, PodcastPeer::TYPE => 7, ),
|
||||||
BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'URL' => 1, 'TITLE' => 2, 'CREATOR' => 3, 'DESCRIPTION' => 4, 'AUTO_INGEST' => 5, 'OWNER' => 6, ),
|
BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'URL' => 1, 'TITLE' => 2, 'CREATOR' => 3, 'DESCRIPTION' => 4, 'AUTO_INGEST' => 5, 'OWNER' => 6, 'TYPE' => 7, ),
|
||||||
BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'url' => 1, 'title' => 2, 'creator' => 3, 'description' => 4, 'auto_ingest' => 5, 'owner' => 6, ),
|
BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'url' => 1, 'title' => 2, 'creator' => 3, 'description' => 4, 'auto_ingest' => 5, 'owner' => 6, 'type' => 7, ),
|
||||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, )
|
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, )
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -173,6 +176,7 @@ abstract class BasePodcastPeer
|
||||||
$criteria->addSelectColumn(PodcastPeer::DESCRIPTION);
|
$criteria->addSelectColumn(PodcastPeer::DESCRIPTION);
|
||||||
$criteria->addSelectColumn(PodcastPeer::AUTO_INGEST);
|
$criteria->addSelectColumn(PodcastPeer::AUTO_INGEST);
|
||||||
$criteria->addSelectColumn(PodcastPeer::OWNER);
|
$criteria->addSelectColumn(PodcastPeer::OWNER);
|
||||||
|
$criteria->addSelectColumn(PodcastPeer::TYPE);
|
||||||
} else {
|
} else {
|
||||||
$criteria->addSelectColumn($alias . '.id');
|
$criteria->addSelectColumn($alias . '.id');
|
||||||
$criteria->addSelectColumn($alias . '.url');
|
$criteria->addSelectColumn($alias . '.url');
|
||||||
|
@ -181,6 +185,7 @@ abstract class BasePodcastPeer
|
||||||
$criteria->addSelectColumn($alias . '.description');
|
$criteria->addSelectColumn($alias . '.description');
|
||||||
$criteria->addSelectColumn($alias . '.auto_ingest');
|
$criteria->addSelectColumn($alias . '.auto_ingest');
|
||||||
$criteria->addSelectColumn($alias . '.owner');
|
$criteria->addSelectColumn($alias . '.owner');
|
||||||
|
$criteria->addSelectColumn($alias . '.type');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
* @method PodcastQuery orderByDbDescription($order = Criteria::ASC) Order by the description column
|
* @method PodcastQuery orderByDbDescription($order = Criteria::ASC) Order by the description column
|
||||||
* @method PodcastQuery orderByDbAutoIngest($order = Criteria::ASC) Order by the auto_ingest column
|
* @method PodcastQuery orderByDbAutoIngest($order = Criteria::ASC) Order by the auto_ingest column
|
||||||
* @method PodcastQuery orderByDbOwner($order = Criteria::ASC) Order by the owner column
|
* @method PodcastQuery orderByDbOwner($order = Criteria::ASC) Order by the owner column
|
||||||
|
* @method PodcastQuery orderByDbType($order = Criteria::ASC) Order by the type column
|
||||||
*
|
*
|
||||||
* @method PodcastQuery groupByDbId() Group by the id column
|
* @method PodcastQuery groupByDbId() Group by the id column
|
||||||
* @method PodcastQuery groupByDbUrl() Group by the url column
|
* @method PodcastQuery groupByDbUrl() Group by the url column
|
||||||
|
@ -21,6 +22,7 @@
|
||||||
* @method PodcastQuery groupByDbDescription() Group by the description column
|
* @method PodcastQuery groupByDbDescription() Group by the description column
|
||||||
* @method PodcastQuery groupByDbAutoIngest() Group by the auto_ingest column
|
* @method PodcastQuery groupByDbAutoIngest() Group by the auto_ingest column
|
||||||
* @method PodcastQuery groupByDbOwner() Group by the owner column
|
* @method PodcastQuery groupByDbOwner() Group by the owner column
|
||||||
|
* @method PodcastQuery groupByDbType() Group by the type column
|
||||||
*
|
*
|
||||||
* @method PodcastQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
|
* @method PodcastQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
|
||||||
* @method PodcastQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
* @method PodcastQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
||||||
|
@ -43,6 +45,7 @@
|
||||||
* @method Podcast findOneByDbDescription(string $description) Return the first Podcast filtered by the description column
|
* @method Podcast findOneByDbDescription(string $description) Return the first Podcast filtered by the description column
|
||||||
* @method Podcast findOneByDbAutoIngest(boolean $auto_ingest) Return the first Podcast filtered by the auto_ingest column
|
* @method Podcast findOneByDbAutoIngest(boolean $auto_ingest) Return the first Podcast filtered by the auto_ingest column
|
||||||
* @method Podcast findOneByDbOwner(int $owner) Return the first Podcast filtered by the owner column
|
* @method Podcast findOneByDbOwner(int $owner) Return the first Podcast filtered by the owner column
|
||||||
|
* @method Podcast findOneByDbType(int $type) Return the first Podcast filtered by the type column
|
||||||
*
|
*
|
||||||
* @method array findByDbId(int $id) Return Podcast objects filtered by the id column
|
* @method array findByDbId(int $id) Return Podcast objects filtered by the id column
|
||||||
* @method array findByDbUrl(string $url) Return Podcast objects filtered by the url column
|
* @method array findByDbUrl(string $url) Return Podcast objects filtered by the url column
|
||||||
|
@ -51,6 +54,7 @@
|
||||||
* @method array findByDbDescription(string $description) Return Podcast objects filtered by the description column
|
* @method array findByDbDescription(string $description) Return Podcast objects filtered by the description column
|
||||||
* @method array findByDbAutoIngest(boolean $auto_ingest) Return Podcast objects filtered by the auto_ingest column
|
* @method array findByDbAutoIngest(boolean $auto_ingest) Return Podcast objects filtered by the auto_ingest column
|
||||||
* @method array findByDbOwner(int $owner) Return Podcast objects filtered by the owner column
|
* @method array findByDbOwner(int $owner) Return Podcast objects filtered by the owner column
|
||||||
|
* @method array findByDbType(int $type) Return Podcast objects filtered by the type column
|
||||||
*
|
*
|
||||||
* @package propel.generator.airtime.om
|
* @package propel.generator.airtime.om
|
||||||
*/
|
*/
|
||||||
|
@ -158,7 +162,7 @@ abstract class BasePodcastQuery extends ModelCriteria
|
||||||
*/
|
*/
|
||||||
protected function findPkSimple($key, $con)
|
protected function findPkSimple($key, $con)
|
||||||
{
|
{
|
||||||
$sql = 'SELECT "id", "url", "title", "creator", "description", "auto_ingest", "owner" FROM "podcast" WHERE "id" = :p0';
|
$sql = 'SELECT "id", "url", "title", "creator", "description", "auto_ingest", "owner", "type" FROM "podcast" 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);
|
||||||
|
@ -476,6 +480,48 @@ abstract class BasePodcastQuery extends ModelCriteria
|
||||||
return $this->addUsingAlias(PodcastPeer::OWNER, $dbOwner, $comparison);
|
return $this->addUsingAlias(PodcastPeer::OWNER, $dbOwner, $comparison);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query on the type column
|
||||||
|
*
|
||||||
|
* Example usage:
|
||||||
|
* <code>
|
||||||
|
* $query->filterByDbType(1234); // WHERE type = 1234
|
||||||
|
* $query->filterByDbType(array(12, 34)); // WHERE type IN (12, 34)
|
||||||
|
* $query->filterByDbType(array('min' => 12)); // WHERE type >= 12
|
||||||
|
* $query->filterByDbType(array('max' => 12)); // WHERE type <= 12
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* @param mixed $dbType The value to use as filter.
|
||||||
|
* Use scalar values for equality.
|
||||||
|
* Use array values for in_array() equivalent.
|
||||||
|
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||||
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
|
*
|
||||||
|
* @return PodcastQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterByDbType($dbType = null, $comparison = null)
|
||||||
|
{
|
||||||
|
if (is_array($dbType)) {
|
||||||
|
$useMinMax = false;
|
||||||
|
if (isset($dbType['min'])) {
|
||||||
|
$this->addUsingAlias(PodcastPeer::TYPE, $dbType['min'], Criteria::GREATER_EQUAL);
|
||||||
|
$useMinMax = true;
|
||||||
|
}
|
||||||
|
if (isset($dbType['max'])) {
|
||||||
|
$this->addUsingAlias(PodcastPeer::TYPE, $dbType['max'], Criteria::LESS_EQUAL);
|
||||||
|
$useMinMax = true;
|
||||||
|
}
|
||||||
|
if ($useMinMax) {
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
if (null === $comparison) {
|
||||||
|
$comparison = Criteria::IN;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->addUsingAlias(PodcastPeer::TYPE, $dbType, $comparison);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter the query by a related CcSubjs object
|
* Filter the query by a related CcSubjs object
|
||||||
*
|
*
|
||||||
|
|
|
@ -571,6 +571,7 @@
|
||||||
<column name="description" phpName="DbDescription" type="VARCHAR" size="512" />
|
<column name="description" phpName="DbDescription" type="VARCHAR" size="512" />
|
||||||
<column name="auto_ingest" phpName="DbAutoIngest" type="BOOLEAN" required="true" defaultValue="false"/>
|
<column name="auto_ingest" phpName="DbAutoIngest" type="BOOLEAN" required="true" defaultValue="false"/>
|
||||||
<column name="owner" phpName="DbOwner" type="INTEGER" />
|
<column name="owner" phpName="DbOwner" type="INTEGER" />
|
||||||
|
<column name="type" phpName="DbType" type="INTEGER" required="true" defaultValue="1"/>
|
||||||
<foreign-key foreignTable="cc_subjs" name="podcast_owner_fkey" onDelete="CASCADE">
|
<foreign-key foreignTable="cc_subjs" name="podcast_owner_fkey" onDelete="CASCADE">
|
||||||
<reference local="owner" foreign="id" />
|
<reference local="owner" foreign="id" />
|
||||||
</foreign-key>
|
</foreign-key>
|
||||||
|
|
|
@ -722,6 +722,7 @@ CREATE TABLE "podcast"
|
||||||
"description" VARCHAR(512),
|
"description" VARCHAR(512),
|
||||||
"auto_ingest" BOOLEAN DEFAULT 'f' NOT NULL,
|
"auto_ingest" BOOLEAN DEFAULT 'f' NOT NULL,
|
||||||
"owner" INTEGER,
|
"owner" INTEGER,
|
||||||
|
"type" INTEGER DEFAULT 1 NOT NULL,
|
||||||
PRIMARY KEY ("id")
|
PRIMARY KEY ("id")
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue