【问题标题】:Sqlite platform does not support alter foreign key ( Symfony, doctrine migration )Sqlite 平台不支持alter foreign key(Symfony,学说迁移)
【发布时间】:2021-01-05 18:43:29
【问题描述】:

我创建了一些简单的表格,其中包含manytoone 关系。我尝试使用学说生成迁移,使用以下命令:

php bin/console make:migration

我的数据库目前是空的,里面没有表。不幸的是,我收到了这个错误:

Sqlite platform does not support alter foreign key, the table must be fully recreated using getAlterTableSQL.

我不知道如何解决这个问题,以及在生成迁移时如何调用getAlterTableSQL

【问题讨论】:

    标签: php sqlite symfony doctrine


    【解决方案1】:

    这是 Doctrine DBAL 2.10.3 的一个已知问题,考虑降级到 2.10.2(2.10.3 版本不包含安全修复,因此降级非常安全),直到修复 https://github.com/doctrine/dbal/issues/4257

    【讨论】:

      猜你喜欢
      • 2017-04-09
      • 1970-01-01
      • 2023-03-22
      • 1970-01-01
      • 2019-12-28
      • 1970-01-01
      • 2016-12-17
      • 2015-08-03
      • 1970-01-01
      相关资源
      最近更新 更多