postgres-migrate
Migrations for PostgreSQL databases utilizing advisory locks.
Usage
Keep your migration files in a separate folder, as individual .sql
files.
var migrate = ; ;
You can safely start multiple workers at the same time. Only one of them will take the lock, and upgrade the database. The others will wait for the migration to be completed, and then resolve the promise.