0.1.7 • Published 3 years ago
east-mongoose v0.1.7
East Mongoose
This is a Mongoose adapter for the East database migration tool. It has been influenced by the East mongo adapter. This adapter is written and currently targets typescript projects.
Migrations receive an object with the following properties:
db
- an instance of Mongoose Connection
There are also some Typescript migration templates which are not transpiled.
Installation
yarn add east-mongoose
Usage
Typescript migration
import { Connection } from "mongoose";
export const tags = [];
export const migrate = async ({ db }: { db: Connection }): Promise<void> => {
return Promise.resolve();
};
exports.rollback = async ({ db }: { db: Connection }): Promise<void> => {
return Promise.resolve();
};
Licence
MIT