Bunch of schema changes
This commit is contained in:
parent
c7dd2e7256
commit
cfb21f8425
28 changed files with 1647 additions and 5494 deletions
|
@ -70,8 +70,6 @@ class CcSubjsTableMap extends TableMap
|
|||
$this->addRelation('CcSess', 'CcSess', RelationMap::ONE_TO_MANY, array('id' => 'userid', ), 'CASCADE', null, 'CcSesss');
|
||||
$this->addRelation('CcSubjsToken', 'CcSubjsToken', RelationMap::ONE_TO_MANY, array('id' => 'user_id', ), 'CASCADE', null, 'CcSubjsTokens');
|
||||
$this->addRelation('Podcast', 'Podcast', RelationMap::ONE_TO_MANY, array('id' => 'owner', ), 'CASCADE', null, 'Podcasts');
|
||||
$this->addRelation('StationPodcast', 'StationPodcast', RelationMap::ONE_TO_MANY, array('id' => 'owner', ), 'CASCADE', null, 'StationPodcasts');
|
||||
$this->addRelation('ImportedPodcast', 'ImportedPodcast', RelationMap::ONE_TO_MANY, array('id' => 'owner', ), 'CASCADE', null, 'ImportedPodcasts');
|
||||
} // buildRelations()
|
||||
|
||||
} // CcSubjsTableMap
|
||||
|
|
|
@ -36,24 +36,13 @@ class ImportedPodcastTableMap extends TableMap
|
|||
$this->setPhpName('ImportedPodcast');
|
||||
$this->setClassname('ImportedPodcast');
|
||||
$this->setPackage('airtime');
|
||||
$this->setUseIdGenerator(false);
|
||||
$this->setUseIdGenerator(true);
|
||||
$this->setPrimaryKeyMethodInfo('imported_podcast_id_seq');
|
||||
// columns
|
||||
$this->addPrimaryKey('id', 'DbId', 'INTEGER', true, null, null);
|
||||
$this->addColumn('url', 'DbUrl', 'VARCHAR', true, 4096, null);
|
||||
$this->addColumn('auto_ingest', 'DbAutoIngest', 'BOOLEAN', true, null, false);
|
||||
$this->addForeignPrimaryKey('id', 'DbId', 'INTEGER' , 'podcast', 'id', true, null, null);
|
||||
$this->addColumn('title', 'DbTitle', 'VARCHAR', true, 4096, null);
|
||||
$this->addColumn('creator', 'DbCreator', 'VARCHAR', false, 4096, null);
|
||||
$this->addColumn('description', 'DbDescription', 'VARCHAR', false, 4096, null);
|
||||
$this->addColumn('language', 'DbLanguage', 'VARCHAR', false, 4096, null);
|
||||
$this->addColumn('copyright', 'DbCopyright', 'VARCHAR', false, 4096, null);
|
||||
$this->addColumn('link', 'DbLink', 'VARCHAR', false, 4096, null);
|
||||
$this->addColumn('itunes_author', 'DbItunesAuthor', 'VARCHAR', false, 4096, null);
|
||||
$this->addColumn('itunes_keywords', 'DbItunesKeywords', 'VARCHAR', false, 4096, null);
|
||||
$this->addColumn('itunes_summary', 'DbItunesSummary', 'VARCHAR', false, 4096, null);
|
||||
$this->addColumn('itunes_subtitle', 'DbItunesSubtitle', 'VARCHAR', false, 4096, null);
|
||||
$this->addColumn('itunes_category', 'DbItunesCategory', 'VARCHAR', false, 4096, null);
|
||||
$this->addColumn('itunes_explicit', 'DbItunesExplicit', 'VARCHAR', false, 4096, null);
|
||||
$this->addForeignKey('owner', 'DbOwner', 'INTEGER', 'cc_subjs', 'id', false, null, null);
|
||||
$this->addForeignKey('podcast_id', 'DbPodcastId', 'INTEGER', 'podcast', 'id', true, null, null);
|
||||
// validators
|
||||
} // initialize()
|
||||
|
||||
|
@ -62,8 +51,7 @@ class ImportedPodcastTableMap extends TableMap
|
|||
*/
|
||||
public function buildRelations()
|
||||
{
|
||||
$this->addRelation('Podcast', 'Podcast', RelationMap::MANY_TO_ONE, array('id' => 'id', ), 'CASCADE', null);
|
||||
$this->addRelation('CcSubjs', 'CcSubjs', RelationMap::MANY_TO_ONE, array('owner' => 'id', ), 'CASCADE', null);
|
||||
$this->addRelation('Podcast', 'Podcast', RelationMap::MANY_TO_ONE, array('podcast_id' => 'id', ), 'CASCADE', null);
|
||||
} // buildRelations()
|
||||
|
||||
/**
|
||||
|
@ -75,12 +63,8 @@ class ImportedPodcastTableMap extends TableMap
|
|||
public function getBehaviors()
|
||||
{
|
||||
return array(
|
||||
'concrete_inheritance' => array (
|
||||
'extends' => 'podcast',
|
||||
'descendant_column' => 'descendant_class',
|
||||
'copy_data_to_parent' => 'true',
|
||||
'schema' => '',
|
||||
'excluded_parent_behavior' => 'nested_set',
|
||||
'delegate' => array (
|
||||
'to' => 'podcast',
|
||||
),
|
||||
);
|
||||
} // getBehaviors()
|
||||
|
|
|
@ -53,7 +53,6 @@ class PodcastTableMap extends TableMap
|
|||
$this->addColumn('itunes_category', 'DbItunesCategory', 'VARCHAR', false, 4096, null);
|
||||
$this->addColumn('itunes_explicit', 'DbItunesExplicit', 'VARCHAR', false, 4096, null);
|
||||
$this->addForeignKey('owner', 'DbOwner', 'INTEGER', 'cc_subjs', 'id', false, null, null);
|
||||
$this->addColumn('descendant_class', 'DescendantClass', 'VARCHAR', false, 100, null);
|
||||
// validators
|
||||
} // initialize()
|
||||
|
||||
|
@ -63,24 +62,9 @@ class PodcastTableMap extends TableMap
|
|||
public function buildRelations()
|
||||
{
|
||||
$this->addRelation('CcSubjs', 'CcSubjs', RelationMap::MANY_TO_ONE, array('owner' => 'id', ), 'CASCADE', null);
|
||||
$this->addRelation('StationPodcast', 'StationPodcast', RelationMap::ONE_TO_MANY, array('id' => 'podcast_id', ), 'CASCADE', null, 'StationPodcasts');
|
||||
$this->addRelation('ImportedPodcast', 'ImportedPodcast', RelationMap::ONE_TO_MANY, array('id' => 'podcast_id', ), 'CASCADE', null, 'ImportedPodcasts');
|
||||
$this->addRelation('PodcastEpisodes', 'PodcastEpisodes', RelationMap::ONE_TO_MANY, array('id' => 'podcast_id', ), 'CASCADE', null, 'PodcastEpisodess');
|
||||
$this->addRelation('StationPodcast', 'StationPodcast', RelationMap::ONE_TO_ONE, array('id' => 'id', ), 'CASCADE', null);
|
||||
$this->addRelation('ImportedPodcast', 'ImportedPodcast', RelationMap::ONE_TO_ONE, array('id' => 'id', ), 'CASCADE', null);
|
||||
} // buildRelations()
|
||||
|
||||
/**
|
||||
*
|
||||
* Gets the list of behaviors registered for this table
|
||||
*
|
||||
* @return array Associative array (name => parameters) of behaviors
|
||||
*/
|
||||
public function getBehaviors()
|
||||
{
|
||||
return array(
|
||||
'concrete_inheritance_parent' => array (
|
||||
'descendant_column' => 'descendant_class',
|
||||
),
|
||||
);
|
||||
} // getBehaviors()
|
||||
|
||||
} // PodcastTableMap
|
||||
|
|
|
@ -36,22 +36,11 @@ class StationPodcastTableMap extends TableMap
|
|||
$this->setPhpName('StationPodcast');
|
||||
$this->setClassname('StationPodcast');
|
||||
$this->setPackage('airtime');
|
||||
$this->setUseIdGenerator(false);
|
||||
$this->setUseIdGenerator(true);
|
||||
$this->setPrimaryKeyMethodInfo('station_podcast_id_seq');
|
||||
// columns
|
||||
$this->addForeignPrimaryKey('id', 'DbId', 'INTEGER' , 'podcast', 'id', true, null, null);
|
||||
$this->addColumn('title', 'DbTitle', 'VARCHAR', true, 4096, null);
|
||||
$this->addColumn('creator', 'DbCreator', 'VARCHAR', false, 4096, null);
|
||||
$this->addColumn('description', 'DbDescription', 'VARCHAR', false, 4096, null);
|
||||
$this->addColumn('language', 'DbLanguage', 'VARCHAR', false, 4096, null);
|
||||
$this->addColumn('copyright', 'DbCopyright', 'VARCHAR', false, 4096, null);
|
||||
$this->addColumn('link', 'DbLink', 'VARCHAR', false, 4096, null);
|
||||
$this->addColumn('itunes_author', 'DbItunesAuthor', 'VARCHAR', false, 4096, null);
|
||||
$this->addColumn('itunes_keywords', 'DbItunesKeywords', 'VARCHAR', false, 4096, null);
|
||||
$this->addColumn('itunes_summary', 'DbItunesSummary', 'VARCHAR', false, 4096, null);
|
||||
$this->addColumn('itunes_subtitle', 'DbItunesSubtitle', 'VARCHAR', false, 4096, null);
|
||||
$this->addColumn('itunes_category', 'DbItunesCategory', 'VARCHAR', false, 4096, null);
|
||||
$this->addColumn('itunes_explicit', 'DbItunesExplicit', 'VARCHAR', false, 4096, null);
|
||||
$this->addForeignKey('owner', 'DbOwner', 'INTEGER', 'cc_subjs', 'id', false, null, null);
|
||||
$this->addPrimaryKey('id', 'DbId', 'INTEGER', true, null, null);
|
||||
$this->addForeignKey('podcast_id', 'DbPodcastId', 'INTEGER', 'podcast', 'id', true, null, null);
|
||||
// validators
|
||||
} // initialize()
|
||||
|
||||
|
@ -60,8 +49,7 @@ class StationPodcastTableMap extends TableMap
|
|||
*/
|
||||
public function buildRelations()
|
||||
{
|
||||
$this->addRelation('Podcast', 'Podcast', RelationMap::MANY_TO_ONE, array('id' => 'id', ), 'CASCADE', null);
|
||||
$this->addRelation('CcSubjs', 'CcSubjs', RelationMap::MANY_TO_ONE, array('owner' => 'id', ), 'CASCADE', null);
|
||||
$this->addRelation('Podcast', 'Podcast', RelationMap::MANY_TO_ONE, array('podcast_id' => 'id', ), 'CASCADE', null);
|
||||
} // buildRelations()
|
||||
|
||||
/**
|
||||
|
@ -73,12 +61,8 @@ class StationPodcastTableMap extends TableMap
|
|||
public function getBehaviors()
|
||||
{
|
||||
return array(
|
||||
'concrete_inheritance' => array (
|
||||
'extends' => 'podcast',
|
||||
'descendant_column' => 'descendant_class',
|
||||
'copy_data_to_parent' => 'true',
|
||||
'schema' => '',
|
||||
'excluded_parent_behavior' => 'nested_set',
|
||||
'delegate' => array (
|
||||
'to' => 'podcast',
|
||||
),
|
||||
);
|
||||
} // getBehaviors()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue