2011-06-29 14:32:17 +02:00
|
|
|
<?php
|
|
|
|
namespace DoctrineMigrations;
|
2011-07-15 22:38:46 +02:00
|
|
|
//CC-2279 Upgrade script for creating the cc_music_dirs table.
|
2011-06-29 14:32:17 +02:00
|
|
|
|
|
|
|
use Doctrine\DBAL\Migrations\AbstractMigration,
|
|
|
|
Doctrine\DBAL\Schema\Schema;
|
|
|
|
|
|
|
|
class Version20110629143017 extends AbstractMigration
|
|
|
|
{
|
|
|
|
public function up(Schema $schema)
|
|
|
|
{
|
2011-06-29 18:53:19 +02:00
|
|
|
//create cc_music_dirs table
|
|
|
|
$cc_music_dirs = $schema->createTable('cc_music_dirs');
|
|
|
|
|
|
|
|
$cc_music_dirs->addColumn('id', 'integer', array('unsigned' => true, 'autoincrement' => true));
|
|
|
|
$cc_music_dirs->addColumn('type', 'string', array('length' => 255));
|
|
|
|
$cc_music_dirs->addColumn('directory', 'text', array('unique' => true));
|
|
|
|
|
|
|
|
$cc_music_dirs->setPrimaryKey(array('id'));
|
2011-07-14 22:39:18 +02:00
|
|
|
|
2011-06-29 18:53:19 +02:00
|
|
|
//end create cc_music_dirs table
|
2011-06-29 14:32:17 +02:00
|
|
|
}
|
2011-07-15 22:38:46 +02:00
|
|
|
|
|
|
|
|
2011-06-29 14:32:17 +02:00
|
|
|
|
|
|
|
public function down(Schema $schema)
|
|
|
|
{
|
2011-07-14 21:58:15 +02:00
|
|
|
$schema->dropTable('cc_music_dirs');
|
2011-06-29 14:32:17 +02:00
|
|
|
}
|
2011-06-29 18:53:19 +02:00
|
|
|
}
|