Make build log and meta value columns use MEDIUMTEXT data type.
This commit is contained in:
parent
872d37b1e6
commit
0f680c800b
28
PHPCI/Migrations/20150203105015_fix_column_types.php
Normal file
28
PHPCI/Migrations/20150203105015_fix_column_types.php
Normal file
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
use Phinx\Db\Adapter\MysqlAdapter;
|
||||
|
||||
class FixColumnTypes extends AbstractMigration
|
||||
{
|
||||
/**
|
||||
* Migrate Up.
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
// Update the build log column to MEDIUMTEXT:
|
||||
$build = $this->table('build');
|
||||
$build->changeColumn('log', 'text', array(
|
||||
'null' => true,
|
||||
'default' => '',
|
||||
'limit' => MysqlAdapter::TEXT_MEDIUM,
|
||||
));
|
||||
|
||||
// Update the build meta value column to MEDIUMTEXT:
|
||||
$buildMeta = $this->table('build_meta');
|
||||
$buildMeta->changeColumn('meta_value', 'text', array(
|
||||
'null' => false,
|
||||
'limit' => MysqlAdapter::TEXT_MEDIUM,
|
||||
));
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue