Good morning
I´m testing migrate, I created a new migrate ok, I create a method safeUp e safeDown to create a new table, but I had this error message:
[b]
exception ‘CDbException’ with message 'CDbConnection failed to open the DB conne
ction: could not find driver’ in C:\Program Files\Apache Software Foundation\Apa
che2.2\htdocs\yii\framework\db\CDbConnection.php:364
[/b]
I configureted the main db connection:
'db'=>array(
'connectionString' => 'mysql:host=servidor:3306;dbname=migrate',
'emulatePrepare' => true,
'username' => 'root',
'password' => '123456',
'charset' => 'utf8',
),
This my migrate code:
class m110929_135042_tabela1 extends CDbMigration
{
public function safeUp()
{
$this->createTable('nova_tabela', array(
'id' => 'pk' ,
'titulo' => 'string not null',
'obs' => 'text' ,
));
}
public function safeDown()
{
$this->dropTable('nova_tabela');
}
}
I have another aplications using Yii framework and database, my database is mysql.
Why this error?