Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 CakeDc Migrations 插件进行数据库迁移。我的应用程序正在使用两个数据库。所以在database.php中配置它。我已经编写了许多与 database1(默认连接)协调的迁移,并且工作正常。现在我想编写一个与 database2 协调的迁移(我只想在 database2 上运行这些查询)。我该如何区分?在什么级别?
谢谢你。
只需阅读帮助文本和文档。
--connection, -c Overrides the 'default' connection of the MigrationVersion --migrationConnection, -i Overrides the 'default' connection of the CakeMigrations that are applied
还有更多选项,只需键入cake migrations.migration并阅读它显示的内容。/Docs 文件夹中还有很多文档。
cake migrations.migration