1
我使用Yii創建了一個測試應用程序,並創建了我的第一個遷移。Yii試圖使用SQLite的MySQL數據庫遷移
<?php
class m111128_223507_reverse_bed_patient extends CDbMigration
{
public function up()
{
$this->dropForeignKey('fk_bed_patient1', 'bed');
$this->dropColumn('bed', 'patient_id');
$this->addColumn('patient', 'bed_id', 'int(11)');
$this->addForeignKey('fk_patient_bed1', 'patient', 'bed_id', 'bed', 'id', 'NO ACTION', 'NO ACTION');
}
public function down()
{
echo "m111128_223507_reverse_bed_patient does not support migration down.\n";
return false;
}
}
出於某種原因的Yii認爲我如何使用SQLite數據庫,即使在我的應用程序main.php我有MySQL的設置,這些設置可以正常工作在其他地方和SQLite的行註釋掉。
我在嘗試第一次遷移時遇到此錯誤。
*從消息表牀...例外 'CDbException' 應用m111128_223507_reverse_bed_patient drop列patient_id '滴DB列不被SQLite的支持。' in ..
我在這裏錯過了什麼?