madara-alliance / madara-orchestrator

MIT License
9 stars 15 forks source link

Mongo db migrations js #149

Closed apoorvsadana closed 2 weeks ago

apoorvsadana commented 2 weeks ago

Not the best code because

  1. It hardcodes mongodb in the Dockferfile
  2. It needs node/npm to be installed in Docker just to run a migration

There was one Rust library that handles mongodb migrations but it doesn't look maintained. Ideally, we can move migrations to a generic function that databases need to implement and we can call them in init_config. Or we can just do the migrations in new_with_settings. That would however, need custom logic to be added so I did this for now as it does the job.

coveralls commented 2 weeks ago

Coverage Status

Changes unknown when pulling 0e2a40b40ed198e6ef3d01fe9f332a50b0257c46 on mongo_db_migrations_js into on main.