069026bc2d
config instead of only overwrite. This commit solve issues: #14, #70, #106, #121.
33 lines
802 B
PHP
33 lines
802 B
PHP
<?php
|
|
|
|
use Phinx\Migration\AbstractMigration;
|
|
|
|
class AddedOverwriteConfigFieldToProject extends AbstractMigration
|
|
{
|
|
public function up()
|
|
{
|
|
if ($this->hasTable('project')) {
|
|
$table = $this->table('project');
|
|
|
|
if (!$table->hasColumn('overwrite_build_config')) {
|
|
$table
|
|
->addColumn('overwrite_build_config', 'integer', ['default' => 1])
|
|
->save();
|
|
}
|
|
}
|
|
}
|
|
|
|
public function down()
|
|
{
|
|
if ($this->hasTable('project')) {
|
|
$table = $this->table('project');
|
|
|
|
if ($table->hasColumn('overwrite_build_config')) {
|
|
$table
|
|
->removeColumn('overwrite_build_config')
|
|
->save();
|
|
}
|
|
}
|
|
}
|
|
}
|