diff --git a/airtime_mvc/application/models/airtime/map/CcShowTableMap.php b/airtime_mvc/application/models/airtime/map/CcShowTableMap.php index 8a2686670..6200997f4 100644 --- a/airtime_mvc/application/models/airtime/map/CcShowTableMap.php +++ b/airtime_mvc/application/models/airtime/map/CcShowTableMap.php @@ -51,6 +51,7 @@ class CcShowTableMap extends TableMap { $this->addColumn('LIVE_STREAM_PASS', 'DbLiveStreamPass', 'VARCHAR', false, 255, null); $this->addColumn('LINKED', 'DbLinked', 'BOOLEAN', true, null, false); $this->addColumn('IS_LINKABLE', 'DbIsLinkable', 'BOOLEAN', true, null, true); + $this->addColumn('IMAGE_PATH', 'DbImagePath', 'VARCHAR', false, 255, null); // validators } // initialize() diff --git a/airtime_mvc/application/models/airtime/om/BaseCcShow.php b/airtime_mvc/application/models/airtime/om/BaseCcShow.php index 3cf4dab1f..8f3e6574a 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcShow.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcShow.php @@ -109,6 +109,12 @@ abstract class BaseCcShow extends BaseObject implements Persistent */ protected $is_linkable; + /** + * The value for the image_path field. + * @var string + */ + protected $image_path; + /** * @var array CcShowInstances[] Collection to store aggregation of CcShowInstances objects. */ @@ -300,6 +306,16 @@ abstract class BaseCcShow extends BaseObject implements Persistent return $this->is_linkable; } + /** + * Get the [image_path] column value. + * + * @return string + */ + public function getDbImagePath() + { + return $this->image_path; + } + /** * Set the value of [id] column. * @@ -560,6 +576,26 @@ abstract class BaseCcShow extends BaseObject implements Persistent return $this; } // setDbIsLinkable() + /** + * Set the value of [image_path] column. + * + * @param string $v new value + * @return CcShow The current object (for fluent API support) + */ + public function setDbImagePath($v) + { + if ($v !== null) { + $v = (string) $v; + } + + if ($this->image_path !== $v) { + $this->image_path = $v; + $this->modifiedColumns[] = CcShowPeer::IMAGE_PATH; + } + + return $this; + } // setDbImagePath() + /** * Indicates whether the columns in this object are only set to default values. * @@ -633,6 +669,7 @@ abstract class BaseCcShow extends BaseObject implements Persistent $this->live_stream_pass = ($row[$startcol + 10] !== null) ? (string) $row[$startcol + 10] : null; $this->linked = ($row[$startcol + 11] !== null) ? (boolean) $row[$startcol + 11] : null; $this->is_linkable = ($row[$startcol + 12] !== null) ? (boolean) $row[$startcol + 12] : null; + $this->image_path = ($row[$startcol + 13] !== null) ? (string) $row[$startcol + 13] : null; $this->resetModified(); $this->setNew(false); @@ -641,7 +678,7 @@ abstract class BaseCcShow extends BaseObject implements Persistent $this->ensureConsistency(); } - return $startcol + 13; // 13 = CcShowPeer::NUM_COLUMNS - CcShowPeer::NUM_LAZY_LOAD_COLUMNS). + return $startcol + 14; // 14 = CcShowPeer::NUM_COLUMNS - CcShowPeer::NUM_LAZY_LOAD_COLUMNS). } catch (Exception $e) { throw new PropelException("Error populating CcShow object", $e); @@ -1051,6 +1088,9 @@ abstract class BaseCcShow extends BaseObject implements Persistent case 12: return $this->getDbIsLinkable(); break; + case 13: + return $this->getDbImagePath(); + break; default: return null; break; @@ -1087,6 +1127,7 @@ abstract class BaseCcShow extends BaseObject implements Persistent $keys[10] => $this->getDbLiveStreamPass(), $keys[11] => $this->getDbLinked(), $keys[12] => $this->getDbIsLinkable(), + $keys[13] => $this->getDbImagePath(), ); return $result; } @@ -1157,6 +1198,9 @@ abstract class BaseCcShow extends BaseObject implements Persistent case 12: $this->setDbIsLinkable($value); break; + case 13: + $this->setDbImagePath($value); + break; } // switch() } @@ -1194,6 +1238,7 @@ abstract class BaseCcShow extends BaseObject implements Persistent if (array_key_exists($keys[10], $arr)) $this->setDbLiveStreamPass($arr[$keys[10]]); if (array_key_exists($keys[11], $arr)) $this->setDbLinked($arr[$keys[11]]); if (array_key_exists($keys[12], $arr)) $this->setDbIsLinkable($arr[$keys[12]]); + if (array_key_exists($keys[13], $arr)) $this->setDbImagePath($arr[$keys[13]]); } /** @@ -1218,6 +1263,7 @@ abstract class BaseCcShow extends BaseObject implements Persistent if ($this->isColumnModified(CcShowPeer::LIVE_STREAM_PASS)) $criteria->add(CcShowPeer::LIVE_STREAM_PASS, $this->live_stream_pass); if ($this->isColumnModified(CcShowPeer::LINKED)) $criteria->add(CcShowPeer::LINKED, $this->linked); if ($this->isColumnModified(CcShowPeer::IS_LINKABLE)) $criteria->add(CcShowPeer::IS_LINKABLE, $this->is_linkable); + if ($this->isColumnModified(CcShowPeer::IMAGE_PATH)) $criteria->add(CcShowPeer::IMAGE_PATH, $this->image_path); return $criteria; } @@ -1291,6 +1337,7 @@ abstract class BaseCcShow extends BaseObject implements Persistent $copyObj->setDbLiveStreamPass($this->live_stream_pass); $copyObj->setDbLinked($this->linked); $copyObj->setDbIsLinkable($this->is_linkable); + $copyObj->setDbImagePath($this->image_path); if ($deepCopy) { // important: temporarily setNew(false) because this affects the behavior of @@ -1895,6 +1942,7 @@ abstract class BaseCcShow extends BaseObject implements Persistent $this->live_stream_pass = null; $this->linked = null; $this->is_linkable = null; + $this->image_path = null; $this->alreadyInSave = false; $this->alreadyInValidation = false; $this->clearAllReferences(); diff --git a/airtime_mvc/application/models/airtime/om/BaseCcShowPeer.php b/airtime_mvc/application/models/airtime/om/BaseCcShowPeer.php index c49ef60fb..029d76f8a 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcShowPeer.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcShowPeer.php @@ -26,7 +26,7 @@ abstract class BaseCcShowPeer { const TM_CLASS = 'CcShowTableMap'; /** The total number of columns. */ - const NUM_COLUMNS = 13; + const NUM_COLUMNS = 14; /** The number of lazy-loaded columns. */ const NUM_LAZY_LOAD_COLUMNS = 0; @@ -70,6 +70,9 @@ abstract class BaseCcShowPeer { /** the column name for the IS_LINKABLE field */ const IS_LINKABLE = 'cc_show.IS_LINKABLE'; + /** the column name for the IMAGE_PATH field */ + const IMAGE_PATH = 'cc_show.IMAGE_PATH'; + /** * An identiy map to hold any loaded instances of CcShow objects. * This must be public so that other peer classes can access this when hydrating from JOIN @@ -86,12 +89,12 @@ abstract class BaseCcShowPeer { * e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id' */ private static $fieldNames = array ( - BasePeer::TYPE_PHPNAME => array ('DbId', 'DbName', 'DbUrl', 'DbGenre', 'DbDescription', 'DbColor', 'DbBackgroundColor', 'DbLiveStreamUsingAirtimeAuth', 'DbLiveStreamUsingCustomAuth', 'DbLiveStreamUser', 'DbLiveStreamPass', 'DbLinked', 'DbIsLinkable', ), - BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbName', 'dbUrl', 'dbGenre', 'dbDescription', 'dbColor', 'dbBackgroundColor', 'dbLiveStreamUsingAirtimeAuth', 'dbLiveStreamUsingCustomAuth', 'dbLiveStreamUser', 'dbLiveStreamPass', 'dbLinked', 'dbIsLinkable', ), - BasePeer::TYPE_COLNAME => array (self::ID, self::NAME, self::URL, self::GENRE, self::DESCRIPTION, self::COLOR, self::BACKGROUND_COLOR, self::LIVE_STREAM_USING_AIRTIME_AUTH, self::LIVE_STREAM_USING_CUSTOM_AUTH, self::LIVE_STREAM_USER, self::LIVE_STREAM_PASS, self::LINKED, self::IS_LINKABLE, ), - BasePeer::TYPE_RAW_COLNAME => array ('ID', 'NAME', 'URL', 'GENRE', 'DESCRIPTION', 'COLOR', 'BACKGROUND_COLOR', 'LIVE_STREAM_USING_AIRTIME_AUTH', 'LIVE_STREAM_USING_CUSTOM_AUTH', 'LIVE_STREAM_USER', 'LIVE_STREAM_PASS', 'LINKED', 'IS_LINKABLE', ), - BasePeer::TYPE_FIELDNAME => array ('id', 'name', 'url', 'genre', 'description', 'color', 'background_color', 'live_stream_using_airtime_auth', 'live_stream_using_custom_auth', 'live_stream_user', 'live_stream_pass', 'linked', 'is_linkable', ), - BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, ) + BasePeer::TYPE_PHPNAME => array ('DbId', 'DbName', 'DbUrl', 'DbGenre', 'DbDescription', 'DbColor', 'DbBackgroundColor', 'DbLiveStreamUsingAirtimeAuth', 'DbLiveStreamUsingCustomAuth', 'DbLiveStreamUser', 'DbLiveStreamPass', 'DbLinked', 'DbIsLinkable', 'DbImagePath', ), + BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbName', 'dbUrl', 'dbGenre', 'dbDescription', 'dbColor', 'dbBackgroundColor', 'dbLiveStreamUsingAirtimeAuth', 'dbLiveStreamUsingCustomAuth', 'dbLiveStreamUser', 'dbLiveStreamPass', 'dbLinked', 'dbIsLinkable', 'dbImagePath', ), + BasePeer::TYPE_COLNAME => array (self::ID, self::NAME, self::URL, self::GENRE, self::DESCRIPTION, self::COLOR, self::BACKGROUND_COLOR, self::LIVE_STREAM_USING_AIRTIME_AUTH, self::LIVE_STREAM_USING_CUSTOM_AUTH, self::LIVE_STREAM_USER, self::LIVE_STREAM_PASS, self::LINKED, self::IS_LINKABLE, self::IMAGE_PATH, ), + BasePeer::TYPE_RAW_COLNAME => array ('ID', 'NAME', 'URL', 'GENRE', 'DESCRIPTION', 'COLOR', 'BACKGROUND_COLOR', 'LIVE_STREAM_USING_AIRTIME_AUTH', 'LIVE_STREAM_USING_CUSTOM_AUTH', 'LIVE_STREAM_USER', 'LIVE_STREAM_PASS', 'LINKED', 'IS_LINKABLE', 'IMAGE_PATH', ), + BasePeer::TYPE_FIELDNAME => array ('id', 'name', 'url', 'genre', 'description', 'color', 'background_color', 'live_stream_using_airtime_auth', 'live_stream_using_custom_auth', 'live_stream_user', 'live_stream_pass', 'linked', 'is_linkable', 'image_path', ), + BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, ) ); /** @@ -101,12 +104,12 @@ abstract class BaseCcShowPeer { * e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 */ private static $fieldKeys = array ( - BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbName' => 1, 'DbUrl' => 2, 'DbGenre' => 3, 'DbDescription' => 4, 'DbColor' => 5, 'DbBackgroundColor' => 6, 'DbLiveStreamUsingAirtimeAuth' => 7, 'DbLiveStreamUsingCustomAuth' => 8, 'DbLiveStreamUser' => 9, 'DbLiveStreamPass' => 10, 'DbLinked' => 11, 'DbIsLinkable' => 12, ), - BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbName' => 1, 'dbUrl' => 2, 'dbGenre' => 3, 'dbDescription' => 4, 'dbColor' => 5, 'dbBackgroundColor' => 6, 'dbLiveStreamUsingAirtimeAuth' => 7, 'dbLiveStreamUsingCustomAuth' => 8, 'dbLiveStreamUser' => 9, 'dbLiveStreamPass' => 10, 'dbLinked' => 11, 'dbIsLinkable' => 12, ), - BasePeer::TYPE_COLNAME => array (self::ID => 0, self::NAME => 1, self::URL => 2, self::GENRE => 3, self::DESCRIPTION => 4, self::COLOR => 5, self::BACKGROUND_COLOR => 6, self::LIVE_STREAM_USING_AIRTIME_AUTH => 7, self::LIVE_STREAM_USING_CUSTOM_AUTH => 8, self::LIVE_STREAM_USER => 9, self::LIVE_STREAM_PASS => 10, self::LINKED => 11, self::IS_LINKABLE => 12, ), - BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'NAME' => 1, 'URL' => 2, 'GENRE' => 3, 'DESCRIPTION' => 4, 'COLOR' => 5, 'BACKGROUND_COLOR' => 6, 'LIVE_STREAM_USING_AIRTIME_AUTH' => 7, 'LIVE_STREAM_USING_CUSTOM_AUTH' => 8, 'LIVE_STREAM_USER' => 9, 'LIVE_STREAM_PASS' => 10, 'LINKED' => 11, 'IS_LINKABLE' => 12, ), - BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'name' => 1, 'url' => 2, 'genre' => 3, 'description' => 4, 'color' => 5, 'background_color' => 6, 'live_stream_using_airtime_auth' => 7, 'live_stream_using_custom_auth' => 8, 'live_stream_user' => 9, 'live_stream_pass' => 10, 'linked' => 11, 'is_linkable' => 12, ), - BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, ) + BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbName' => 1, 'DbUrl' => 2, 'DbGenre' => 3, 'DbDescription' => 4, 'DbColor' => 5, 'DbBackgroundColor' => 6, 'DbLiveStreamUsingAirtimeAuth' => 7, 'DbLiveStreamUsingCustomAuth' => 8, 'DbLiveStreamUser' => 9, 'DbLiveStreamPass' => 10, 'DbLinked' => 11, 'DbIsLinkable' => 12, 'DbImagePath' => 13, ), + BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbName' => 1, 'dbUrl' => 2, 'dbGenre' => 3, 'dbDescription' => 4, 'dbColor' => 5, 'dbBackgroundColor' => 6, 'dbLiveStreamUsingAirtimeAuth' => 7, 'dbLiveStreamUsingCustomAuth' => 8, 'dbLiveStreamUser' => 9, 'dbLiveStreamPass' => 10, 'dbLinked' => 11, 'dbIsLinkable' => 12, 'dbImagePath' => 13, ), + BasePeer::TYPE_COLNAME => array (self::ID => 0, self::NAME => 1, self::URL => 2, self::GENRE => 3, self::DESCRIPTION => 4, self::COLOR => 5, self::BACKGROUND_COLOR => 6, self::LIVE_STREAM_USING_AIRTIME_AUTH => 7, self::LIVE_STREAM_USING_CUSTOM_AUTH => 8, self::LIVE_STREAM_USER => 9, self::LIVE_STREAM_PASS => 10, self::LINKED => 11, self::IS_LINKABLE => 12, self::IMAGE_PATH => 13, ), + BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'NAME' => 1, 'URL' => 2, 'GENRE' => 3, 'DESCRIPTION' => 4, 'COLOR' => 5, 'BACKGROUND_COLOR' => 6, 'LIVE_STREAM_USING_AIRTIME_AUTH' => 7, 'LIVE_STREAM_USING_CUSTOM_AUTH' => 8, 'LIVE_STREAM_USER' => 9, 'LIVE_STREAM_PASS' => 10, 'LINKED' => 11, 'IS_LINKABLE' => 12, 'IMAGE_PATH' => 13, ), + BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'name' => 1, 'url' => 2, 'genre' => 3, 'description' => 4, 'color' => 5, 'background_color' => 6, 'live_stream_using_airtime_auth' => 7, 'live_stream_using_custom_auth' => 8, 'live_stream_user' => 9, 'live_stream_pass' => 10, 'linked' => 11, 'is_linkable' => 12, 'image_path' => 13, ), + BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, ) ); /** @@ -191,6 +194,7 @@ abstract class BaseCcShowPeer { $criteria->addSelectColumn(CcShowPeer::LIVE_STREAM_PASS); $criteria->addSelectColumn(CcShowPeer::LINKED); $criteria->addSelectColumn(CcShowPeer::IS_LINKABLE); + $criteria->addSelectColumn(CcShowPeer::IMAGE_PATH); } else { $criteria->addSelectColumn($alias . '.ID'); $criteria->addSelectColumn($alias . '.NAME'); @@ -205,6 +209,7 @@ abstract class BaseCcShowPeer { $criteria->addSelectColumn($alias . '.LIVE_STREAM_PASS'); $criteria->addSelectColumn($alias . '.LINKED'); $criteria->addSelectColumn($alias . '.IS_LINKABLE'); + $criteria->addSelectColumn($alias . '.IMAGE_PATH'); } } diff --git a/airtime_mvc/application/models/airtime/om/BaseCcShowQuery.php b/airtime_mvc/application/models/airtime/om/BaseCcShowQuery.php index 687335e03..b7c411daa 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcShowQuery.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcShowQuery.php @@ -19,6 +19,7 @@ * @method CcShowQuery orderByDbLiveStreamPass($order = Criteria::ASC) Order by the live_stream_pass column * @method CcShowQuery orderByDbLinked($order = Criteria::ASC) Order by the linked column * @method CcShowQuery orderByDbIsLinkable($order = Criteria::ASC) Order by the is_linkable column + * @method CcShowQuery orderByDbImagePath($order = Criteria::ASC) Order by the image_path column * * @method CcShowQuery groupByDbId() Group by the id column * @method CcShowQuery groupByDbName() Group by the name column @@ -33,6 +34,7 @@ * @method CcShowQuery groupByDbLiveStreamPass() Group by the live_stream_pass column * @method CcShowQuery groupByDbLinked() Group by the linked column * @method CcShowQuery groupByDbIsLinkable() Group by the is_linkable column + * @method CcShowQuery groupByDbImagePath() Group by the image_path column * * @method CcShowQuery leftJoin($relation) Adds a LEFT JOIN clause to the query * @method CcShowQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query @@ -70,6 +72,7 @@ * @method CcShow findOneByDbLiveStreamPass(string $live_stream_pass) Return the first CcShow filtered by the live_stream_pass column * @method CcShow findOneByDbLinked(boolean $linked) Return the first CcShow filtered by the linked column * @method CcShow findOneByDbIsLinkable(boolean $is_linkable) Return the first CcShow filtered by the is_linkable column + * @method CcShow findOneByDbImagePath(string $image_path) Return the first CcShow filtered by the image_path column * * @method array findByDbId(int $id) Return CcShow objects filtered by the id column * @method array findByDbName(string $name) Return CcShow objects filtered by the name column @@ -84,6 +87,7 @@ * @method array findByDbLiveStreamPass(string $live_stream_pass) Return CcShow objects filtered by the live_stream_pass column * @method array findByDbLinked(boolean $linked) Return CcShow objects filtered by the linked column * @method array findByDbIsLinkable(boolean $is_linkable) Return CcShow objects filtered by the is_linkable column + * @method array findByDbImagePath(string $image_path) Return CcShow objects filtered by the image_path column * * @package propel.generator.airtime.om */ @@ -454,6 +458,28 @@ abstract class BaseCcShowQuery extends ModelCriteria return $this->addUsingAlias(CcShowPeer::IS_LINKABLE, $dbIsLinkable, $comparison); } + /** + * Filter the query on the image_path column + * + * @param string $dbImagePath 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 CcShowQuery The current query, for fluid interface + */ + public function filterByDbImagePath($dbImagePath = null, $comparison = null) + { + if (null === $comparison) { + if (is_array($dbImagePath)) { + $comparison = Criteria::IN; + } elseif (preg_match('/[\%\*]/', $dbImagePath)) { + $dbImagePath = str_replace('*', '%', $dbImagePath); + $comparison = Criteria::LIKE; + } + } + return $this->addUsingAlias(CcShowPeer::IMAGE_PATH, $dbImagePath, $comparison); + } + /** * Filter the query by a related CcShowInstances object * diff --git a/airtime_mvc/build/build.properties b/airtime_mvc/build/build.properties index da4a76877..ee5a5f8fa 100644 --- a/airtime_mvc/build/build.properties +++ b/airtime_mvc/build/build.properties @@ -1,6 +1,6 @@ #Note: project.home is automatically generated by the propel-install script. #Any manual changes to this value will be overwritten. -project.home = /home/ubuntu/airtime/airtime_mvc +project.home = /home/sourcefabric/dev/Airtime-SaaS/Airtime/airtime_mvc project.build = ${project.home}/build #Database driver diff --git a/airtime_mvc/build/schema.xml b/airtime_mvc/build/schema.xml index 684497769..227a1af0b 100644 --- a/airtime_mvc/build/schema.xml +++ b/airtime_mvc/build/schema.xml @@ -136,6 +136,9 @@ + + diff --git a/airtime_mvc/build/sql/schema.sql b/airtime_mvc/build/sql/schema.sql index a7a4c0d66..3bb5d8733 100644 --- a/airtime_mvc/build/sql/schema.sql +++ b/airtime_mvc/build/sql/schema.sql @@ -158,6 +158,7 @@ CREATE TABLE "cc_show" "live_stream_pass" VARCHAR(255), "linked" BOOLEAN default 'f' NOT NULL, "is_linkable" BOOLEAN default 't' NOT NULL, + "image_path" VARCHAR(255), PRIMARY KEY ("id") ); @@ -733,25 +734,6 @@ CREATE TABLE "cc_listener_count" COMMENT ON TABLE "cc_listener_count" IS ''; -SET search_path TO public; ------------------------------------------------------------------------------ --- cc_locale ------------------------------------------------------------------------------ - -DROP TABLE "cc_locale" CASCADE; - - -CREATE TABLE "cc_locale" -( - "id" serial NOT NULL, - "locale_code" VARCHAR(16) NOT NULL, - "locale_lang" VARCHAR(128) NOT NULL, - PRIMARY KEY ("id") -); - -COMMENT ON TABLE "cc_locale" IS ''; - - SET search_path TO public; ----------------------------------------------------------------------------- -- cc_playout_history