umzug-massive-storage
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

umzug-massive-storage

This is a plugin for Umzug so you can drop in an instance of Massive for the migration metadata storage location.

If you are using Postgres, and want to use Massive, but also need database migrations/source control, then umzug + umzug-massive-storage is a solution for you.

Documentation

Minimal Example

import * as Umzug from 'umzug'
import * as Massive from 'massive'

import { MassiveStorage } from 'umzug-massive-storage'

const massive = await Massive({ ...massiveOptions })
const umzugMassiveStorage = new MassiveStorage({
  db: massive,
})
const umzug = new Umzug({
  storage: umzugMassiveStorage,
  ...moreUmzugOptions,
})
// await umzug.up()

Usage

Installation

umzug-massive-storage is available on npm.

npm i umzug-massive-storage

MassiveStorage Constructor Options

import { MassiveStorage } from 'umzug-massive-storage'

const massiveStorage = new MassiveStorage({
  // The instance of Massive
  // required
  db: massiveInstance,
  
  // The Postgres schema to store the migration table
  // optional, default is 'meta'
  schema: 'meta',
  
  // The Postgres table to record the migration
  // optional, default is 'migrations'
  table: 'migrations',
})

License

See the LICENSE file.

Readme

Keywords

Package Sidebar

Install

npm i umzug-massive-storage

Weekly Downloads

1

Version

1.0.1

License

Unlicense

Unpacked Size

9.79 kB

Total Files

11

Last publish

Collaborators

  • michaelbuhler