@zemble/migrations

0.0.25 • Public • Published

@zemble/migrations

Install

bun install @zemble/migrations

Create your first migration

bunx create-migration <name> [template]

The migration should export an up and optionally a down function

Add plugin to your app

import { createApp } from '@zemble/app';
import Migrations from '@zemble/migrations';
import MongoAdapter from '@zemble/mongodb/helpers/migration-adapter';

const app = createApp({
  plugins: [
    Migrations.configure({
      createAdapter: () => new MongoAdapter(mongoUrl),
    })
  ],
});

The provider could be for any type of database, mongodb is just an example.

Package Sidebar

Install

npm i @zemble/migrations

Weekly Downloads

436

Version

0.0.25

License

none

Unpacked Size

14.7 kB

Total Files

11

Last publish

Collaborators

  • robertherber