Added a checkbox to build only the default branch specified in the project.

This commit is contained in:
Pat Suwalski 2017-09-13 21:21:49 +07:00 committed by Dmitry Khomutov
commit bbbd9b3cf2
7 changed files with 102 additions and 12 deletions

View file

@ -0,0 +1,24 @@
<?php
use Phinx\Migration\AbstractMigration;
class AddedDefaultBranchOnly extends AbstractMigration
{
public function up()
{
$project = $this->table('project');
if (!$project->hasColumn('default_branch_only')) {
$project->addColumn('default_branch_only', 'integer');
}
}
public function down()
{
$project = $this->table('project');
if ($project->hasColumn('default_branch_only')) {
$project->removeColumn('default_branch_only')->save();
}
}
}