使用AWS CDK部署后如何执行数据库架构迁移? [英] How to perform database schema migrations after deploying with AWS CDK?
本文介绍了使用AWS CDK部署后如何执行数据库架构迁移?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在运行Aurora PostgreSQL(无服务器)集群.第一次部署基础结构之后,以及每次重新部署后,我都希望运行数据库架构迁移(添加表,添加列).
I'm running an Aurora PostgreSQL (Serverless) cluster. After I deploy the infrastructure for the first time, and every time I re-deploy, I want to run database schema migrations (add tables, add columns).
我该怎么做?
Lambda是不可能的,因为迁移可能会持续很长时间.
Lambda is out of the question, as migrations may run for a long time.
修改:阐明了架构迁移
谢谢!
推荐答案
如果要查找有关使用自定义资源在Aurora中迁移数据库架构的示例.在此存储库中查看详细的示例.
If you're looking for an example on migrating database schema in Aurora using custom resources. See a detailed example in this repository.
这篇关于使用AWS CDK部署后如何执行数据库架构迁移?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文