tweak cleanup migration
This commit is contained in:
parent
541b59bb28
commit
e2e23a290f
@ -27,10 +27,6 @@ class AnimeCollectionRefactorCleanup extends AbstractMigration
|
|||||||
}
|
}
|
||||||
$this->table('media')->insert($moreMediaTypes)->save();
|
$this->table('media')->insert($moreMediaTypes)->save();
|
||||||
|
|
||||||
// Cleanup existing media types a bit
|
|
||||||
$this->execute("UPDATE media SET type='Bootleg' WHERE id=4");
|
|
||||||
$this->execute('DELETE FROM media WHERE id=1');
|
|
||||||
|
|
||||||
// Remove foreign key and media_id column from anime_set
|
// Remove foreign key and media_id column from anime_set
|
||||||
$animeSet = $this->table('anime_set');
|
$animeSet = $this->table('anime_set');
|
||||||
if ($animeSet->hasColumn('media_id'))
|
if ($animeSet->hasColumn('media_id'))
|
||||||
@ -38,6 +34,10 @@ class AnimeCollectionRefactorCleanup extends AbstractMigration
|
|||||||
$animeSet->dropForeignKey('media_id')->save();
|
$animeSet->dropForeignKey('media_id')->save();
|
||||||
$animeSet->removeColumn('media_id')->save();
|
$animeSet->removeColumn('media_id')->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Cleanup existing media types a bit
|
||||||
|
$this->execute("UPDATE media SET type='Bootleg' WHERE id=4");
|
||||||
|
$this->execute('DELETE FROM media WHERE id=1');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down()
|
public function down()
|
||||||
|
Loading…
Reference in New Issue
Block a user