# mongo-migrant

> perform mongoDb migrations easily

Latest version **0.1.3** (published 2019-08-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install mongo-migrant
pnpm add mongo-migrant
yarn add mongo-migrant
bun add mongo-migrant
```

Provides the command `mongo-migrant`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2019-08-01 |
| First published | 2019-08-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8.0.0 |
| Dependencies | 5 |
| Unpacked size | 259 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Jesse Okeya |
| Maintainers | jesseokeya |
| Keywords | nodejs, mongo, mlab, mongoose, oclif |

## Links

- npm: https://www.npmjs.com/package/mongo-migrant
- Repository: https://github.com/jesseokeya/migrant
- Homepage: https://github.com/jesseokeya/migrant#readme
- Issues: https://github.com/jesseokeya/migrant/issues
- npm.io page: https://npm.io/package/mongo-migrant

## Dependencies (5)

- [colors](https://npm.io/package/colors.md) ^1.3.3
- [mongodb](https://npm.io/package/mongodb.md) ^3.2.7
- [@oclif/config](https://npm.io/package/@oclif/config.md) ^1.12.11
- [@oclif/command](https://npm.io/package/@oclif/command.md) ^1.5.12
- [@oclif/plugin-help](https://npm.io/package/@oclif/plugin-help.md) ^2.1.6

## Alternatives

- [angular-pipes](https://npm.io/package/angular-pipes.md) — 5.6K weekly downloads
- [@ng-web-apis/midi](https://npm.io/package/@ng-web-apis/midi.md) — 2.6K weekly downloads
- [happn-3](https://npm.io/package/happn-3.md) — 1.6K weekly downloads
- [@opensip-cli/lang-go](https://npm.io/package/@opensip-cli/lang-go.md) — 1.2K weekly downloads
- [mongoose-typescript](https://npm.io/package/mongoose-typescript.md) — 85 weekly downloads

## Recent versions

- 0.1.3 (latest) — 2019-08-01
- 0.1.2 — 2019-08-01
- 0.1.1 — 2019-08-01
- 0.1.0 — 2019-08-01
- 0.0.7 — 2019-08-01
- 0.0.6 — 2019-08-01
- 0.0.5 — 2019-08-01
- 0.0.4 — 2019-08-01
- 0.0.3 — 2019-08-01
- 0.0.2 — 2019-08-01
- 0.0.1 — 2019-08-01
- 1.0.0 — 2019-08-01

## README

# Mongo Migrant
### Perform mongoDb migrations easily


![](/images/screenshot.png)

## Getting Started

### Installing

Install node dependecies required

```
npm install mongo-migrant --save
```

Inorder to use the command line tools you have to install mongo-migrant globally

```
npm install mongo-migrant -g
```

### Usage

```js
const Migrant = require('mongo-migrant')

const context = new Migrant({
    /** Database uri your migrating from  **/
    up: process.env.UP,
    /** Database uri our migrating to **/
    down: process.env.DOWN
})

/** performs database migration **/
context.migrate()
```` 

### CLI Usage

Displays current version of mongo-migrant

```sh
mongo-migrant --version
```

Displays command line usage / docs

```sh
mongo-migrant --help
```

Performs mongo database migration

```sh
mongo-migrant --up='database_uri_your_migrating_from' --down='database_uri_your_migrating_to'
```

## Authors
* **Jesse Okeya** - *Initial work* - [jesseokeya](https://github.com/jesseokeya)

## License

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details

## Acknowledgments
* oclif 
* mongoClient

---
_Source: https://npm.io/package/mongo-migrant · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
