This should be in the common/db package, and it should run the migrations only if necessary. It should take a database advisory lock first to make sure no other package is trying to migrate. But this will probably have a "stop the world" effect, hence the particular need to check first.
This should be in the
common/db
package, and it should run the migrations only if necessary. It should take a database advisory lock first to make sure no other package is trying to migrate. But this will probably have a "stop the world" effect, hence the particular need to check first.