Simple, yet powerful mongo migration package
Features
- tested right fromm the beginning
- mongo-v3
Usage
Sample migration
const config = url: "mongodb://localhost/" database: "migrationTest" migrationCollection: "migrations"; const testMigration = testConfig;testMigration;testMigration;const result = await testMigration;
Migration cleanup Removes non existent migrations from the migrations database and refreshes the hashes of already executed migrations. It doesn't actually run any migrations.
⚠️ This is a feature you shouldn't be required to use, but there might be rare cases where it get's useful.⚠️
const config = url: "mongodb://localhost/" database: "migrationTest" migrationCollection: "migrations"; const testMigration = testConfig;testMigration;testMigration;const result = await testMigration;