Changed build_meta.meta_value column type from TEXT to LONGTEXT for MySQL. Issue #94.
This commit is contained in:
parent
bd1382e90e
commit
acd73e2ba1
3 changed files with 36 additions and 2 deletions
|
|
@ -11,7 +11,11 @@ class FixedBuildLogColumnForMysql extends AbstractMigration
|
|||
if ($adapter instanceof MysqlAdapter) {
|
||||
$this
|
||||
->table('build')
|
||||
->changeColumn('log', MysqlAdapter::PHINX_TYPE_TEXT, ['limit' => MysqlAdapter::TEXT_LONG])
|
||||
->changeColumn(
|
||||
'log',
|
||||
MysqlAdapter::PHINX_TYPE_TEXT,
|
||||
['limit' => MysqlAdapter::TEXT_LONG]
|
||||
)
|
||||
->save();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,11 @@ class FixedBuildLogColumnForMysql2 extends AbstractMigration
|
|||
if ($adapter instanceof MysqlAdapter) {
|
||||
$this
|
||||
->table('build')
|
||||
->changeColumn('log', MysqlAdapter::PHINX_TYPE_TEXT, ['limit' => MysqlAdapter::TEXT_LONG, 'null' => true])
|
||||
->changeColumn(
|
||||
'log',
|
||||
MysqlAdapter::PHINX_TYPE_TEXT,
|
||||
['limit' => MysqlAdapter::TEXT_LONG, 'null' => true]
|
||||
)
|
||||
->save();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,26 @@
|
|||
<?php
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
use Phinx\Db\Adapter\MysqlAdapter;
|
||||
|
||||
class FixedBuildMetaForMysql extends AbstractMigration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
$adapter = $this->getAdapter();
|
||||
if ($adapter instanceof MysqlAdapter) {
|
||||
$this
|
||||
->table('build_meta')
|
||||
->changeColumn(
|
||||
'meta_value',
|
||||
MysqlAdapter::PHINX_TYPE_TEXT,
|
||||
['limit' => MysqlAdapter::TEXT_LONG, 'null' => false]
|
||||
)
|
||||
->save();
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue