From c752651d109937ba2915659093daffa97242235c Mon Sep 17 00:00:00 2001 From: Dmitry Khomutov Date: Sun, 16 Apr 2017 20:09:33 +0700 Subject: [PATCH] Fixed environment field in build table --- .../20170416130610_fixed_environments.php | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/PHPCensor/Migrations/20170416130610_fixed_environments.php diff --git a/src/PHPCensor/Migrations/20170416130610_fixed_environments.php b/src/PHPCensor/Migrations/20170416130610_fixed_environments.php new file mode 100644 index 00000000..8c2b96b4 --- /dev/null +++ b/src/PHPCensor/Migrations/20170416130610_fixed_environments.php @@ -0,0 +1,28 @@ +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(); + } + } +}