Skip to content

Provides a common service for migrations in JavaScript.

License

Notifications You must be signed in to change notification settings

js-migrations/core

Repository files navigation

core

Provides a database agnostic service for processing migrations in JavaScript. Read the docs for more information.

Usage

  1. Install it with npm i @js-migrations/core.
  2. Create a repository facade.
  3. Use the factory to create the service facade.
  4. Use the service facade by understanding the docs or trying one of the supported presenters.

Create a repository facade

This package contains the RepoFacade TypeScript interface. You can create a facade to match the interface using the factories below.

Use the factory

import migrationsServiceFactory from '@js-migrations/core/dist/factory';

const migrationsServiceFacade = migrationsServiceFactory({
  repo: migrationsRepoFacade,
});

Use a supported presenter

The service facade is used by the following packages that provide a presentation layer to the service.