php-censor/src/Migrations/20150203105015_fix_column_types.php

29 lines
637 B
PHP
Raw Permalink Normal View History

<?php
use Phinx\Migration\AbstractMigration;
class FixColumnTypes extends AbstractMigration
{
public function up()
{
$build = $this->table('build');
2016-05-07 08:43:21 +02:00
2017-01-29 03:49:43 +01:00
$build->changeColumn('log', 'text', ['null' => true]);
$buildMeta = $this->table('build_meta');
2016-05-07 08:43:21 +02:00
2017-01-29 03:49:43 +01:00
$buildMeta->changeColumn('meta_value', 'text', ['null' => false]);
}
2016-05-07 08:43:21 +02:00
public function down()
{
$build = $this->table('build');
$build->changeColumn('log', 'text', ['null' => true]);
$buildMeta = $this->table('build_meta');
$buildMeta->changeColumn('meta_value', 'text', ['null' => false]);
}
2015-02-12 15:11:58 +01:00
}