基线现有数据库
Baseline existing database
我正在研究 Sqitch,到目前为止它似乎是一个很棒的工具,但是我有一个现有的项目想要使用它,有没有办法创建基线?
例如,我备份了我的架构,然后将其添加到部署脚本中,然后我想要 运行 一个不会 运行 数据库上的脚本的命令已经存在,但会在此之后应用所有内容吗?
我需要完整的基本架构,以便我们可以在需要时重新部署整个架构
您可以使用 sqitch deploy
命令的 --log-only
选项
来自文档:https://sqitch.org/docs/manual/sqitch-deploy/
--log-only
Log the changes as if they were deployed, but without actually running the deploy scripts. Useful for an existing database that is being converted to Sqitch, and you need to log changes as deployed because they have been deployed by other means in the past.
我正在研究 Sqitch,到目前为止它似乎是一个很棒的工具,但是我有一个现有的项目想要使用它,有没有办法创建基线?
例如,我备份了我的架构,然后将其添加到部署脚本中,然后我想要 运行 一个不会 运行 数据库上的脚本的命令已经存在,但会在此之后应用所有内容吗?
我需要完整的基本架构,以便我们可以在需要时重新部署整个架构
您可以使用 sqitch deploy
命令的 --log-only
选项
来自文档:https://sqitch.org/docs/manual/sqitch-deploy/
--log-only
Log the changes as if they were deployed, but without actually running the deploy scripts. Useful for an existing database that is being converted to Sqitch, and you need to log changes as deployed because they have been deployed by other means in the past.