Welcome Guest, Not a member yet? Register   Sign In
Error creando tablas con dbforge / Error with DB Forge table creation
#1

[eluser]Unknown[/eluser]
EspaƱol:
Despues de buscar en varios post la solucion a mi problema (Error creando tablas con dbforge) encontre este post que les voy a traducir en el cual esta la solucion:

Post original: http://ellislab.com/forums/viewthread/100121/

En el archivo "system\database\drivers\mysql\mysql_forge.php" en la fila 154 esta el siguiente codigo:
Codigo original / Original Code
Code:
if (count($primary_keys) > 0)
{
$key_name = $this->db->_protect_identifiers(implode('_', $primary_keys));
$primary_keys = $this->db->_protect_identifiers($primary_keys);
$sql .= ",\n\tPRIMARY KEY ".$key_name." (" . implode(', ', $primary_keys) . ")";
}

sustituyanlo por este:
Codigo nuevo / New code
Code:
if (count($primary_keys) > 0)
{
$key_name = $this->db->_protect_identifiers(implode('_', $primary_keys));
$primary_keys = $this->db->_protect_identifiers(implode(', ', $primary_keys));
$sql .= ",\n\tPRIMARY KEY ".$key_name." (" . $primary_keys . ")";
}

esto hara que funcione la creacion de tablas con llaves primarias.

English:
If you get some errors creting tables on CI with dbfoge, it is a bug, just go to the file "system\database\drivers\mysql\mysql_forge.php" and search the line 154, then delete the Original code show above and paste the New code above.

Espero que les sea de ayuda!!! / I hope it help you!!!




Theme © iAndrew 2016 - Forum software by © MyBB