msupply-foundation / conforma-server

Conforma application manager (IRIMS) back-end
GNU Affero General Public License v3.0
4 stars 1 forks source link

Move "migrate" script to its own process so it doesn't get loaded by main server #1125

Open CarlosNZ opened 1 month ago

CarlosNZ commented 1 month ago

It's getting quite large now, and seems unreasonably to load a bunch of methods into memory that are only run at startup (and most not at all, if they're older migrations).

Suggest not calling "migrate" script from main server process. Instead, add it as a separate command in the the yarn dev script, to run it before the main server process.