php-censor/src/PHPCensor/Migrations/20180228024622_renamed_build_types.php
Dmitry Khomutov 58f1004652
Renamed projects types and build classes: 'remote'/RemoteGitBuild to
'git'/GitBuild, MercurialBuild to HgBuild, SubversionBuild to SvnBuild,
'bitbuckethg' to 'bitbucket-hg'.
2018-02-28 10:02:55 +07:00

19 lines
530 B
PHP

<?php
use Phinx\Migration\AbstractMigration;
class RenamedBuildTypes extends AbstractMigration
{
public function up()
{
$this->execute("UPDATE project SET type = 'git' WHERE type = 'remote'");
$this->execute("UPDATE project SET type = 'bitbucket-hg' WHERE type = 'bitbuckethg'");
}
public function down()
{
$this->execute("UPDATE project SET type = 'remote' WHERE type = 'git'");
$this->execute("UPDATE project SET type = 'bitbuckethg' WHERE type = 'bitbucket-hg'");
}
}