cc-4304: fixed ticket by deleting playlists when user is deleted. also removed useless index on file_exists
-regen propel files
This commit is contained in:
parent
c74354b6f9
commit
2d6be404d4
4 changed files with 6 additions and 5 deletions
|
@ -53,7 +53,7 @@ class CcPlaylistTableMap extends TableMap {
|
|||
*/
|
||||
public function buildRelations()
|
||||
{
|
||||
$this->addRelation('CcSubjs', 'CcSubjs', RelationMap::MANY_TO_ONE, array('creator_id' => 'id', ), null, null);
|
||||
$this->addRelation('CcSubjs', 'CcSubjs', RelationMap::MANY_TO_ONE, array('creator_id' => 'id', ), 'CASCADE', null);
|
||||
$this->addRelation('CcPlaylistcontents', 'CcPlaylistcontents', RelationMap::ONE_TO_MANY, array('id' => 'playlist_id', ), 'CASCADE', null);
|
||||
} // buildRelations()
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ class CcSubjsTableMap extends TableMap {
|
|||
$this->addRelation('CcFilesRelatedByDbEditedby', 'CcFiles', RelationMap::ONE_TO_MANY, array('id' => 'editedby', ), null, null);
|
||||
$this->addRelation('CcPerms', 'CcPerms', RelationMap::ONE_TO_MANY, array('id' => 'subj', ), 'CASCADE', null);
|
||||
$this->addRelation('CcShowHosts', 'CcShowHosts', RelationMap::ONE_TO_MANY, array('id' => 'subjs_id', ), 'CASCADE', null);
|
||||
$this->addRelation('CcPlaylist', 'CcPlaylist', RelationMap::ONE_TO_MANY, array('id' => 'creator_id', ), null, null);
|
||||
$this->addRelation('CcPlaylist', 'CcPlaylist', RelationMap::ONE_TO_MANY, array('id' => 'creator_id', ), 'CASCADE', null);
|
||||
$this->addRelation('CcBlock', 'CcBlock', RelationMap::ONE_TO_MANY, array('id' => 'creator_id', ), null, null);
|
||||
$this->addRelation('CcPref', 'CcPref', RelationMap::ONE_TO_MANY, array('id' => 'subjid', ), 'CASCADE', null);
|
||||
$this->addRelation('CcSess', 'CcSess', RelationMap::ONE_TO_MANY, array('id' => 'userid', ), 'CASCADE', null);
|
||||
|
|
|
@ -404,6 +404,9 @@ abstract class BaseCcSubjsPeer {
|
|||
// Invalidate objects in CcShowHostsPeer instance pool,
|
||||
// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
|
||||
CcShowHostsPeer::clearInstancePool();
|
||||
// Invalidate objects in CcPlaylistPeer instance pool,
|
||||
// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
|
||||
CcPlaylistPeer::clearInstancePool();
|
||||
// Invalidate objects in CcPrefPeer instance pool,
|
||||
// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
|
||||
CcPrefPeer::clearInstancePool();
|
||||
|
|
|
@ -105,8 +105,6 @@ CREATE INDEX "cc_files_md5_idx" ON "cc_files" ("md5");
|
|||
|
||||
CREATE INDEX "cc_files_name_idx" ON "cc_files" ("name");
|
||||
|
||||
CREATE INDEX "cc_files_file_exists_idx" ON "cc_files" ("file_exists");
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
-- cc_perms
|
||||
-----------------------------------------------------------------------------
|
||||
|
@ -691,7 +689,7 @@ ALTER TABLE "cc_show_hosts" ADD CONSTRAINT "cc_perm_show_fkey" FOREIGN KEY ("sho
|
|||
|
||||
ALTER TABLE "cc_show_hosts" ADD CONSTRAINT "cc_perm_host_fkey" FOREIGN KEY ("subjs_id") REFERENCES "cc_subjs" ("id") ON DELETE CASCADE;
|
||||
|
||||
ALTER TABLE "cc_playlist" ADD CONSTRAINT "cc_playlist_createdby_fkey" FOREIGN KEY ("creator_id") REFERENCES "cc_subjs" ("id");
|
||||
ALTER TABLE "cc_playlist" ADD CONSTRAINT "cc_playlist_createdby_fkey" FOREIGN KEY ("creator_id") REFERENCES "cc_subjs" ("id") ON DELETE CASCADE;
|
||||
|
||||
ALTER TABLE "cc_playlistcontents" ADD CONSTRAINT "cc_playlistcontents_file_id_fkey" FOREIGN KEY ("file_id") REFERENCES "cc_files" ("id") ON DELETE CASCADE;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue