migrate 要對 MongoDB 進行資料庫的 Migration,Migration 檔案內要放置要給 MongoDB 用 db.runCommand 運行的命令,附檔名為 json。




migrate 的資料庫這邊要參照下列格式設定。就可以透過 migrate 做資料庫的 Migration。
mongodb://user:password@host:port/dbname?query

運行 Migration 後資料庫內會多個 schema_migrations collection,用以存放 Migration 的資訊。

Link