1.0.0 • Published 2 years 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
2 years ago
1.0.0-rc.5
2 years ago
1.0.0-rc.6
2 years ago
1.0.0-rc.3
2 years ago
1.0.0-rc.4
2 years ago
1.0.0-rc.1
2 years ago
1.0.0-rc.2
2 years ago
1.0.0-rc.0
2 years ago
0.4.2
2 years ago
0.4.1
2 years ago
0.4.0
2 years ago
0.3.3
3 years ago
0.3.2
3 years ago
0.3.1
3 years ago
0.3.0
3 years ago
0.2.1
4 years ago
0.2.0
4 years ago
0.1.1
5 years ago
0.1.0
5 years ago
0.0.7
5 years ago
0.0.6
5 years ago