@zemble/migrations
v0.0.32
Published
@zemble Plugin providing generic migration functionality
Downloads
3,682
Maintainers
Readme
@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.