php-censor/src/Migrations/20160425162114_branch_column_length.php
2018-03-09 13:46:18 +07:00

25 lines
775 B
PHP

<?php
use Phinx\Migration\AbstractMigration;
class BranchColumnLength extends AbstractMigration
{
public function up()
{
$table = $this->table('build');
$table->changeColumn('branch', 'string', ['limit' => 250, 'null' => false, 'default' => 'master']);
$table = $this->table('project');
$table->changeColumn('branch', 'string', ['limit' => 250, 'null' => false, 'default' => 'master']);
}
public function down()
{
$table = $this->table('build');
$table->changeColumn('branch', 'string', ['limit' => 50, 'null' => false, 'default' => 'master']);
$table = $this->table('project');
$table->changeColumn('branch', 'string', ['limit' => 50, 'null' => false, 'default' => 'master']);
}
}