最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

postgresql - Using synchronize: true after the project has been live in Typeorm - Stack Overflow

programmeradmin0浏览0评论

During initial development of my project, I used typeorm synchronize: true, and it has helped me a lot. But when the time reaches to make it live in production, I just kept the synchronize to true in the production as well.

But now the I want to do changes in the system, by which there will be changes in the schema as well, and then I need to make things live again.

My questions are:

  1. Should I keep synchronize: true in development phase or in development environment? Because from now, I will again go to development environment, but it will be the maintenance phase. If I keep it false, then I have to keep generating migrations and keep running them by the time I finalize the maintenance, and then I can run the same migrations on the live server, but it will consume some of my time doing it all.

  2. What is the correct way of doing this, if I keep synchronize set to true in development, once the development is finalized and I am ready for production. What should I do first, and when will I stop using synchronize: true in development environment as well?

发布评论

评论列表(0)

  1. 暂无评论