1.0.0 • Published 6 months ago
@neo9/n9-mongodb-migration v1.0.0
n9-mongodb-migration
Project to run migration script on mongodb.
simple usage :
import { N9MongodbMigration } from '@neo9/n9-mongodb-migration';
const mongodbPatchApplier = new N9MongodbMigration({
migrationScriptsFolderPath: './scripts',
mongodbURI: process.env.MONGODB_URI,
});
await mongodbPatchApplier.apply();
Scripts names :
x.y.z_dscription-of-the-upgrade.js
Script example :
async function up(db, log) {
await db.collection('test').insertOne({
test: true,
});
}
async function down(db, log) {
await db.collection('test').deleteOne({
test: true,
});
}
module.exports = { up, down };
More examples can be found in the tests folder.
1.0.0
6 months ago
1.0.0-rc.5
6 months ago
1.0.0-rc.6
6 months ago
1.0.0-rc.3
7 months ago
1.0.0-rc.4
7 months ago
1.0.0-rc.1
7 months ago
1.0.0-rc.2
7 months ago
1.0.0-rc.0
8 months ago
0.4.2
8 months ago
0.4.1
10 months ago
0.4.0
11 months ago
0.3.3
2 years ago
0.3.2
2 years ago
0.3.1
2 years ago
0.3.0
2 years ago
0.2.1
3 years ago
0.2.0
3 years ago
0.1.1
4 years ago
0.1.0
4 years ago
0.0.7
4 years ago
0.0.6
4 years ago