diff --git a/airtime_mvc/application/models/airtime/map/CcShowTableMap.php b/airtime_mvc/application/models/airtime/map/CcShowTableMap.php index f0d7c84c3..713de40a9 100644 --- a/airtime_mvc/application/models/airtime/map/CcShowTableMap.php +++ b/airtime_mvc/application/models/airtime/map/CcShowTableMap.php @@ -45,8 +45,8 @@ class CcShowTableMap extends TableMap { $this->addColumn('DESCRIPTION', 'DbDescription', 'VARCHAR', false, 512, null); $this->addColumn('COLOR', 'DbColor', 'VARCHAR', false, 6, null); $this->addColumn('BACKGROUND_COLOR', 'DbBackgroundColor', 'VARCHAR', false, 6, null); - $this->addColumn('LIVE_STREAM_USING_AIRTIME_AUTH', 'DbLiveStreamUsingAirtimeAuth', 'BOOLEAN', false, null, null); - $this->addColumn('LIVE_STREAM_USING_CUSTOM_AUTH', 'DbLiveStreamUsingCustomAuth', 'BOOLEAN', false, null, null); + $this->addColumn('LIVE_STREAM_USING_AIRTIME_AUTH', 'DbLiveStreamUsingAirtimeAuth', 'BOOLEAN', false, null, false); + $this->addColumn('LIVE_STREAM_USING_CUSTOM_AUTH', 'DbLiveStreamUsingCustomAuth', 'BOOLEAN', false, null, false); $this->addColumn('LIVE_STREAM_USER', 'DbLiveStreamUser', 'VARCHAR', false, 255, null); $this->addColumn('LIVE_STREAM_PASS', 'DbLiveStreamPass', 'VARCHAR', false, 255, null); // validators diff --git a/airtime_mvc/application/models/airtime/om/BaseCcShow.php b/airtime_mvc/application/models/airtime/om/BaseCcShow.php index 78722b5ba..35f9798bb 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcShow.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcShow.php @@ -71,12 +71,14 @@ abstract class BaseCcShow extends BaseObject implements Persistent /** * The value for the live_stream_using_airtime_auth field. + * Note: this column has a database default value of: false * @var boolean */ protected $live_stream_using_airtime_auth; /** * The value for the live_stream_using_custom_auth field. + * Note: this column has a database default value of: false * @var boolean */ protected $live_stream_using_custom_auth; @@ -138,6 +140,8 @@ abstract class BaseCcShow extends BaseObject implements Persistent $this->name = ''; $this->url = ''; $this->genre = ''; + $this->live_stream_using_airtime_auth = false; + $this->live_stream_using_custom_auth = false; } /** @@ -412,7 +416,7 @@ abstract class BaseCcShow extends BaseObject implements Persistent $v = (boolean) $v; } - if ($this->live_stream_using_airtime_auth !== $v) { + if ($this->live_stream_using_airtime_auth !== $v || $this->isNew()) { $this->live_stream_using_airtime_auth = $v; $this->modifiedColumns[] = CcShowPeer::LIVE_STREAM_USING_AIRTIME_AUTH; } @@ -432,7 +436,7 @@ abstract class BaseCcShow extends BaseObject implements Persistent $v = (boolean) $v; } - if ($this->live_stream_using_custom_auth !== $v) { + if ($this->live_stream_using_custom_auth !== $v || $this->isNew()) { $this->live_stream_using_custom_auth = $v; $this->modifiedColumns[] = CcShowPeer::LIVE_STREAM_USING_CUSTOM_AUTH; } @@ -502,6 +506,14 @@ abstract class BaseCcShow extends BaseObject implements Persistent return false; } + if ($this->live_stream_using_airtime_auth !== false) { + return false; + } + + if ($this->live_stream_using_custom_auth !== false) { + return false; + } + // otherwise, everything was equal, so return TRUE return true; } // hasOnlyDefaultValues() diff --git a/airtime_mvc/build/schema.xml b/airtime_mvc/build/schema.xml index 16494c300..d60020de1 100644 --- a/airtime_mvc/build/schema.xml +++ b/airtime_mvc/build/schema.xml @@ -146,8 +146,8 @@ - - + + diff --git a/airtime_mvc/build/sql/schema.sql b/airtime_mvc/build/sql/schema.sql index da3029ff6..62b865c1e 100644 --- a/airtime_mvc/build/sql/schema.sql +++ b/airtime_mvc/build/sql/schema.sql @@ -178,8 +178,8 @@ CREATE TABLE "cc_show" "description" VARCHAR(512), "color" VARCHAR(6), "background_color" VARCHAR(6), - "live_stream_using_airtime_auth" BOOLEAN, - "live_stream_using_custom_auth" BOOLEAN, + "live_stream_using_airtime_auth" BOOLEAN default 'f', + "live_stream_using_custom_auth" BOOLEAN default 'f', "live_stream_user" VARCHAR(255), "live_stream_pass" VARCHAR(255), PRIMARY KEY ("id")