Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

204
Views
Sequelize best practices syncing database development vs. production

The documentation for Sequelize states that sequelize.sync() shoudln't be used on production, as it is potentially destructive. Instead, migrations should be used.

Therefore, I am wondering what the best practices are for using sequelize.sync().

Is it common to use environment variables to check if the current environment is development? Like such:

if (process.env.NODE_ENV === 'development') {
    sequelize.sync({ force: true });
}

That way, the database would only be synced in a development environment.

Otherwise, is it common this time to simply not use sync at all, even in a development environment, and use regular migrations?

about 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!