CC-2867: separating Doctrine upgrade into 3 files
- done
This commit is contained in:
parent
5cc7de95ee
commit
b8c2c5dfb1
5 changed files with 61 additions and 34 deletions
26
install_minimal/DoctrineMigrations/Version20110925171051.php
Normal file
26
install_minimal/DoctrineMigrations/Version20110925171051.php
Normal file
|
@ -0,0 +1,26 @@
|
|||
<?php
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Migrations\AbstractMigration,
|
||||
Doctrine\DBAL\Schema\Schema;
|
||||
|
||||
class Version20110925171051 extends AbstractMigration
|
||||
{
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
// move soundcloud_id from cc_show_instances to cc_files
|
||||
$this->_addSql("update cc_files as cf set soundcloud_id = csi.soundcloud_id
|
||||
from cc_show_instances as csi
|
||||
where csi.file_id = cf.id and file_id is not NULL");
|
||||
|
||||
// remove soundcloud_id from cc_show_instance table
|
||||
$cc_show_instances = $schema->getTable('cc_show_instances');
|
||||
$cc_show_instances->dropColumn('soundcloud_id');
|
||||
}
|
||||
|
||||
public function down(Schema $schema)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue