-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added new errors label in build "Errors" tab.
- Loading branch information
Showing
9 changed files
with
186 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
src/PHPCensor/Migrations/20171209135004_added_new_label_for_errors.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?php | ||
|
||
use Phinx\Migration\AbstractMigration; | ||
|
||
class AddedNewLabelForErrors extends AbstractMigration | ||
{ | ||
public function up() | ||
{ | ||
if ($this->hasTable('build_error')) { | ||
$table = $this->table('build_error'); | ||
|
||
if (!$table->hasColumn('hash')) { | ||
$table | ||
->addColumn('hash', 'string', ['limit' => 32, 'default' => '']) | ||
->save(); | ||
} | ||
|
||
if (!$table->hasColumn('is_new')) { | ||
$table | ||
->addColumn('is_new', 'boolean', ['default' => false]) | ||
->save(); | ||
} | ||
} | ||
} | ||
|
||
public function down() | ||
{ | ||
if ($this->hasTable('build_error')) { | ||
$table = $this->table('build_error'); | ||
|
||
if ($table->hasColumn('hash')) { | ||
$table | ||
->removeColumn('hash') | ||
->save(); | ||
} | ||
|
||
if ($table->hasColumn('is_new')) { | ||
$table | ||
->removeColumn('is_new') | ||
->save(); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,7 +53,7 @@ public static function pluginName() | |
{ | ||
return 'technical_debt'; | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters