相关疑难解决方法(0)

Symfony2 - 更改迁移目录

如何更改config.yml中的默认迁移目录?现在我使用2个不同数据库连接的捆绑包,我想创建迁移文件并将它们存储在不同的目录中以使用该教义:迁移:migrate --em =捆绑包的依赖性中的任何函数.

例如:

doctrine:migrate:diff --em=whatever #creating a version file in the DoctrineMigrationsWhatever directory

php app/console doctrine:migrations:status --em=whatever # shows only the version files, that belong to the bundle
Run Code Online (Sandbox Code Playgroud)

migration doctrine bundle symfony

4
推荐指数
2
解决办法
5090
查看次数

如何为 mysql、mssql 和 sqlite 生成学说迁移?

我想使用学说迁移生成数据库迁移脚本。

我的一个客户有 mysql 数据库,另一个有 mssql,我们在我们的开发环境中使用 sqlite。

如果我使用 生成脚本php artisan doctrine:migrations:diff,那么它将从这一行开始:

$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.');
Run Code Online (Sandbox Code Playgroud)

如何从实体类中的更改以某种方式生成迁移脚本,使其也可以在 mysql、sqlsrv 和 sqlite 上使用?

php symfony doctrine-orm doctrine-migrations

1
推荐指数
1
解决办法
570
查看次数