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

29 lines
647 B
PHP

<?php
use Phinx\Migration\AbstractMigration;
class FixedEnvironments extends AbstractMigration
{
public function up()
{
$table = $this->table('build');
if ($table->hasColumn('environment')) {
$table
->changeColumn('environment', 'string', ['limit' => 250, 'null' => true])
->save();
}
}
public function down()
{
$table = $this->table('build');
if ($table->hasColumn('environment')) {
$table
->changeColumn('environment', 'string', ['limit' => 250, 'null' => false])
->save();
}
}
}