SAAS-1058: Podcast table schema

Remove not null constraint on podcast_episodes file_id column
This commit is contained in:
drigato 2015-09-21 14:51:32 -04:00
parent 3db20bd3b5
commit 3198d822bf
6 changed files with 8 additions and 8 deletions

View File

@ -40,7 +40,7 @@ class PodcastEpisodesTableMap extends TableMap
$this->setPrimaryKeyMethodInfo('podcast_episodes_id_seq'); $this->setPrimaryKeyMethodInfo('podcast_episodes_id_seq');
// columns // columns
$this->addPrimaryKey('id', 'DbId', 'INTEGER', true, null, null); $this->addPrimaryKey('id', 'DbId', 'INTEGER', true, null, null);
$this->addForeignKey('file_id', 'DbFileId', 'INTEGER', 'cc_files', 'id', true, null, null); $this->addForeignKey('file_id', 'DbFileId', 'INTEGER', 'cc_files', 'id', false, null, null);
$this->addForeignKey('podcast_id', 'DbPodcastId', 'INTEGER', 'podcast', 'id', true, null, null); $this->addForeignKey('podcast_id', 'DbPodcastId', 'INTEGER', 'podcast', 'id', true, null, null);
$this->addColumn('publication_date', 'DbPublicationDate', 'TIMESTAMP', true, null, null); $this->addColumn('publication_date', 'DbPublicationDate', 'TIMESTAMP', true, null, null);
$this->addColumn('download_url', 'DbDownloadUrl', 'VARCHAR', true, 4096, null); $this->addColumn('download_url', 'DbDownloadUrl', 'VARCHAR', true, 4096, null);

View File

@ -7557,7 +7557,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
$this->podcastEpisodessScheduledForDeletion = clone $this->collPodcastEpisodess; $this->podcastEpisodessScheduledForDeletion = clone $this->collPodcastEpisodess;
$this->podcastEpisodessScheduledForDeletion->clear(); $this->podcastEpisodessScheduledForDeletion->clear();
} }
$this->podcastEpisodessScheduledForDeletion[]= clone $podcastEpisodes; $this->podcastEpisodessScheduledForDeletion[]= $podcastEpisodes;
$podcastEpisodes->setCcFiles(null); $podcastEpisodes->setCcFiles(null);
} }

View File

@ -3656,7 +3656,7 @@ abstract class BaseCcFilesQuery extends ModelCriteria
* *
* @return CcFilesQuery The current query, for fluid interface * @return CcFilesQuery The current query, for fluid interface
*/ */
public function joinPodcastEpisodes($relationAlias = null, $joinType = Criteria::INNER_JOIN) public function joinPodcastEpisodes($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{ {
$tableMap = $this->getTableMap(); $tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('PodcastEpisodes'); $relationMap = $tableMap->getRelation('PodcastEpisodes');
@ -3691,7 +3691,7 @@ abstract class BaseCcFilesQuery extends ModelCriteria
* *
* @return PodcastEpisodesQuery A secondary query class using the current class as primary query * @return PodcastEpisodesQuery A secondary query class using the current class as primary query
*/ */
public function usePodcastEpisodesQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) public function usePodcastEpisodesQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{ {
return $this return $this
->joinPodcastEpisodes($relationAlias, $joinType) ->joinPodcastEpisodes($relationAlias, $joinType)

View File

@ -508,7 +508,7 @@ abstract class BasePodcastEpisodesQuery extends ModelCriteria
* *
* @return PodcastEpisodesQuery The current query, for fluid interface * @return PodcastEpisodesQuery The current query, for fluid interface
*/ */
public function joinCcFiles($relationAlias = null, $joinType = Criteria::INNER_JOIN) public function joinCcFiles($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{ {
$tableMap = $this->getTableMap(); $tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('CcFiles'); $relationMap = $tableMap->getRelation('CcFiles');
@ -543,7 +543,7 @@ abstract class BasePodcastEpisodesQuery extends ModelCriteria
* *
* @return CcFilesQuery A secondary query class using the current class as primary query * @return CcFilesQuery A secondary query class using the current class as primary query
*/ */
public function useCcFilesQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) public function useCcFilesQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{ {
return $this return $this
->joinCcFiles($relationAlias, $joinType) ->joinCcFiles($relationAlias, $joinType)

View File

@ -579,7 +579,7 @@
<table name="podcast_episodes" phpName="PodcastEpisodes"> <table name="podcast_episodes" phpName="PodcastEpisodes">
<column name="id" phpName="DbId" primaryKey="true" type="INTEGER" autoIncrement="true" required="true" /> <column name="id" phpName="DbId" primaryKey="true" type="INTEGER" autoIncrement="true" required="true" />
<column name="file_id" phpName="DbFileId" type="INTEGER" required="true" /> <column name="file_id" phpName="DbFileId" type="INTEGER" />
<column name="podcast_id" phpName="DbPodcastId" type="INTEGER" required="true" /> <column name="podcast_id" phpName="DbPodcastId" type="INTEGER" required="true" />
<column name="publication_date" phpName="DbPublicationDate" type="TIMESTAMP" required="true" /> <column name="publication_date" phpName="DbPublicationDate" type="TIMESTAMP" required="true" />
<column name="download_url" phpName="DbDownloadUrl" type="varchar" size="4096" required="true" /> <column name="download_url" phpName="DbDownloadUrl" type="varchar" size="4096" required="true" />

View File

@ -735,7 +735,7 @@ DROP TABLE IF EXISTS "podcast_episodes" CASCADE;
CREATE TABLE "podcast_episodes" CREATE TABLE "podcast_episodes"
( (
"id" serial NOT NULL, "id" serial NOT NULL,
"file_id" INTEGER NOT NULL, "file_id" INTEGER,
"podcast_id" INTEGER NOT NULL, "podcast_id" INTEGER NOT NULL,
"publication_date" TIMESTAMP NOT NULL, "publication_date" TIMESTAMP NOT NULL,
"download_url" VARCHAR(4096) NOT NULL, "download_url" VARCHAR(4096) NOT NULL,