问题描述
如何使用数据库迁移工具(如Flyway)来管理像存储过程的过程数据库代码?
How should procedural database code like stored procedures be managed with a database migration tool like Flyway?
与DDL不同,我不想看到对存储在多个数据库迁移文件中的存储过程的更改。如何在单个文件中在源代码控制下管理过程代码,而且还可以利用具有Flyway等工具的数据库迁移功能。
Unlike DDL I would not want to see changes to a stored procedure stored within multiple database migration files. How can procedural code be managed within a single file under source control, but also take advantage of database migrations with a tool like Flyway?
推荐答案
p>在框架中没有特殊的结构来处理这个。
There is no special construct in the framework to deal with this. Mainly because I haven't figured out a way to do this that pleases me.
更新:重复脚本现在完全支持,因为Flyway 4.0。请参见
Update: Repeatable scripts are now fully supported as of Flyway 4.0. See https://flywaydb.org/documentation/migration/repeatable
这篇关于使用Flyway迁移存储过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!