使用 Flyway 迁移存储过程 [英] Migrating Stored Procedures with Flyway

查看:29
本文介绍了使用 Flyway 迁移存储过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

应该如何使用像 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?

推荐答案

框架中没有专门的构造来处理这个问题.主要是因为我还没有找到让我满意的方法.

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 开始完全支持可重复的脚本.请参阅 https://flywaydb.org/documentation/migrations#repeatable-migrations

Update: Repeatable scripts are now fully supported as of Flyway 4.0. See https://flywaydb.org/documentation/migrations#repeatable-migrations

这篇关于使用 Flyway 迁移存储过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆