Fixed Build.log column size for MySQL (removed 'NOT NULL')

This commit is contained in:
Dmitry Khomutov 2017-02-26 20:46:24 +07:00
commit 00a2248c93
No known key found for this signature in database
GPG key ID: 7EB36C9576F9ECB9

View file

@ -0,0 +1,22 @@
<?php
use Phinx\Migration\AbstractMigration;
use Phinx\Db\Adapter\MysqlAdapter;
class FixedBuildLogColumnForMysql2 extends AbstractMigration
{
public function up()
{
$adapter = $this->getAdapter();
if ($adapter instanceof MysqlAdapter) {
$this
->table('build')
->changeColumn('log', MysqlAdapter::PHINX_TYPE_TEXT, ['limit' => MysqlAdapter::TEXT_LONG, 'null' => true])
->save();
}
}
public function down()
{
}
}