admin管理员组

文章数量:1318331

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?

本文标签: postgresqlUsing synchronize true after the project has been live in TypeormStack Overflow