Skip to content
@migration-script-runner

Migration Script Runner

An abstract implementation of script runner which can be extended with your own database implementation.

Migration Script Runner

Database-agnostic migration framework for TypeScript and JavaScript.

What makes it different

Works with any database — SQL, NoSQL, or custom. You control the database operations, MSR handles the migration workflow.

Library-first design — Returns structured results instead of calling process.exit(). Safe for production apps, web servers, and serverless functions.

Flexible rollback — Choose your strategy: automatic backup/restore, down() methods, both, or none.

Quick example

const executor = new MigrationScriptExecutor(handler, config);
const result = await executor.up();

if (result.success) {
  console.log(`Executed ${result.executed.length} migrations`);
}

Get started


Photo by Logan Voss on Unsplash

Pinned Loading

  1. msr-core msr-core Public

    Migration Script Runner

    TypeScript

Repositories

Showing 3 of 3 repositories

Top languages

Loading…

Most used topics

Loading…