Fixed to work correctly with MySQL.

This commit is contained in:
Loic d'Anterroches 2008-11-22 22:06:02 +01:00
parent c86cf6e5f1
commit b13633fed2

View File

@ -30,7 +30,7 @@ function IDF_Migrations_5DescToText_up($params=null)
$table = Pluf::factory('IDF_Conf')->getSqlTable(); $table = Pluf::factory('IDF_Conf')->getSqlTable();
$sql = array(); $sql = array();
$sql['PostgreSQL'] = 'ALTER TABLE '.$table.' ALTER vdesc TYPE text'; $sql['PostgreSQL'] = 'ALTER TABLE '.$table.' ALTER vdesc TYPE text';
$sql['MySQL'] = 'ALTER TABLE '.$table.' MODIFY vdesc TYPE text'; $sql['MySQL'] = 'ALTER TABLE '.$table.' CHANGE vdesc TYPE text';
$db = Pluf::db(); $db = Pluf::db();
$engine = Pluf::f('db_engine'); $engine = Pluf::f('db_engine');
if (!isset($sql[$engine])) { if (!isset($sql[$engine])) {