Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 16 |
Version20150716105942 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 2 |
20 | |
0.00% |
0 / 16 |
up | |
0.00% |
0 / 1 |
6 | |
0.00% |
0 / 10 |
|||
down | |
0.00% |
0 / 1 |
6 | |
0.00% |
0 / 6 |
<?php | |
namespace DoctrineMigrations; | |
use Doctrine\DBAL\Migrations\AbstractMigration; | |
use Doctrine\DBAL\Schema\Schema; | |
/** | |
* Auto-generated Migration: Please modify to your needs! | |
*/ | |
class Version20150716105942 extends AbstractMigration | |
{ | |
const NAME = 'mtb_csv_type'; | |
/** | |
* @param Schema $schema | |
*/ | |
public function up(Schema $schema) | |
{ | |
// this up() migration is auto-generated, please modify it to your needs | |
if ($schema->hasTable(self::NAME)) { | |
return true; | |
} | |
$table = $schema->createTable(self::NAME); | |
$table->addColumn('id', 'smallint', array('NotNull' => true)); | |
$table->addColumn('name', 'text', array('NotNull' => false)); | |
$table->addColumn('rank', 'smallint', array('NotNull' => true)); | |
$table->setPrimaryKey(array('id')); | |
} | |
/** | |
* @param Schema $schema | |
*/ | |
public function down(Schema $schema) | |
{ | |
// this down() migration is auto-generated, please modify it to your needs | |
if (!$schema->hasTable(self::NAME)) { | |
return true; | |
} | |
$schema->dropTable(self::NAME); | |
} | |
} |