https://github.com/holyshared/db-migrate-diff
Migration difference detection module for db-migrate
https://github.com/holyshared/db-migrate-diff
Last synced: 6 days ago
JSON representation
Migration difference detection module for db-migrate
- Host: GitHub
- URL: https://github.com/holyshared/db-migrate-diff
- Owner: holyshared
- License: mit
- Created: 2015-10-06T08:13:08.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-02-07T09:19:35.000Z (over 10 years ago)
- Last Synced: 2025-10-07T01:58:17.983Z (8 months ago)
- Language: JavaScript
- Homepage:
- Size: 197 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
db-migrate-diff
======================================
Migration difference detection module for db-migrate.
[](http://badge.fury.io/js/db-migrate-diff)
[](https://travis-ci.org/holyshared/db-migrate-diff)
[](http://codecov.io/github/holyshared/db-migrate-diff?branch=master)
[](https://david-dm.org/holyshared/db-migrate-diff)

Installation
--------------------------------------
npm install db-migrate-diff --save-dev
Basic usage
--------------------------------------
You just run the following command.
db-migrate-diff [options]
If you want to check the difference between the production environment, it will command such as the following.
db-migrate-diff -e production -m ./migrations --config ./database.json
### Command line options
* **--env, -e** The environment to run the migrations under. [default: "dev"]
* **--migrations-dir, -m** The directory containing your migration files. [default: "./migrations"]
* **--config** Location of the database.json file. [default: "./database.json"]
* **--migration-table** Set the name of the migration table.
* **--reporter, -r** Reporter of the difference
* default - Display the differences of migration.
* ghost - Display the migration that does not exist.
Tests
--------------------------------------
Create a database for unit test.
CREATE DATABASE dbmigrate CHARACTER SET = utf8;
Run the test.
npm install
npm test