east-mongoose

Mongoose adapter for the East DB migration tool

Usage no npm install needed!

<script type="module">
  import eastMongoose from 'https://cdn.skypack.dev/east-mongoose';
</script>

README

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:

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