OurBigBook logoOurBigBook Docs OurBigBook logoOurBigBook.comSite
Any pending migrations are done automatically during deployment as part of npm run build, more precisely they are run from web/bin/sync-db.js.
We also have a custom setup where, if the database is not initialized, we first:
  • just creates the database from the latest model descriptions
  • manually fill in the SequelizeMeta migration tracking table with all available migrations to tell Sequelize that all migrations have been done up to this point
This is something that should be merged into Sequelize itself, or at least asked on Stack Overflow, but lazy now.
In order to test migrations locally interactively, you can:
  • commit them on Git
  • git checkout HEAD~
  • reset the database with demo data:
    cd web
    ./bin/generate-demo-data.js --clear
  • Move back to master: git checkout -
  • Run the migration:
    ./bin/sync-db.js

Ancestors (5)

  1. OurBigBook Web database
  2. OurBigBook Web deployment
  3. OurBigBook Web development
  4. OurBigBook Web
  5. OurBigBook Project