我在修改doctrine 2的遷移表時遇到了一些問題。以下代碼始終引發錯誤:平臺不支持「Doctrine \ DBAL \ Platforms \ AbstractPlatform :: getAlterTableSQL」操作。Doctrine 2 migrations如何使用sqlite數據庫更改表?
這很奇怪,因爲sqlite支持alter table。
public function up(Schema $schema)
{
$user = $schema->getTable('user');
$user->addColumn('resellerId', 'integer', array(
'length' => '10',
'notnull' => true,
'unsigned' => true,
));
}
我也測試了這個在mysql數據庫上,它的工作完美。 – tom 2010-09-05 18:54:28
那麼?這不會改變我的陳述。 Mysql!= Sqlite。請仔細閱讀我的答案。 – romanb 2010-09-05 22:12:39
我的確仔細閱讀了你的答案,但我認爲Doctrine DBAL統一了所有的SQL以處理一組數據庫,比如MySQL SQLite,MSSQL,Oracle ......或者我錯了? – tom 2010-09-06 05:10:56