Fixed environment field in build table
This commit is contained in:
parent
1f9ec69c52
commit
c752651d10
|
@ -0,0 +1,28 @@
|
|||
<?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();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue