Permalink
Browse files

Merge pull request #3080 from dbanck/patch-1

Fixes #3078: Migration table primary key is too long for utf8mb4 databas...
  • Loading branch information...
2 parents f868829 + 2e1602a commit 2019d02b639fe0b9d057ed7308b83f7f9b822303 @qiangxue qiangxue committed Nov 29, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 framework/cli/commands/MigrateCommand.php
@@ -39,7 +39,7 @@ class MigrateCommand extends CConsoleCommand
/**
* @var string the name of the table for keeping applied migration information.
* This table will be automatically created if not exists. Defaults to 'tbl_migration'.
- * The table structure is: (version varchar(255) primary key, apply_time integer)
+ * The table structure is: (version varchar(180) primary key, apply_time integer)
*/
public $migrationTable='tbl_migration';
/**
@@ -466,7 +466,7 @@ protected function createMigrationHistoryTable()
$db=$this->getDbConnection();
echo 'Creating migration history table "'.$this->migrationTable.'"...';
$db->createCommand()->createTable($this->migrationTable,array(
- 'version'=>'string NOT NULL PRIMARY KEY',
+ 'version'=>'varchar(180) NOT NULL PRIMARY KEY',
'apply_time'=>'integer',
));
$db->createCommand()->insert($this->migrationTable,array(

0 comments on commit 2019d02

Please sign in to comment.