Get a list of changes between 2 schemas.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
src
.babelrc
.codeclimate.yml
.dockerignore
.eslintrc
.gitignore
.npmignore
.travis.yml
LICENSE
README.md
esdoc.json
package.json
publish-docs.js

README.md

schema-mapper-differ

Get a list of Changes by comparing 2 Projects.

Build status Docs status Code Climate Dependencies License

Installation

npm install --save schema-mapper-differ

Usage

var differ = require('schema-mapper-differ');

var oldProjects = {};
var projects = {
  '0': {
    name: 'demo',
    version: 0,
    schemas: {
      '1': {
        name: 'users',
        primary: '1',
        columns: {
          '1': {
            name: 'id',
            type: 'uuid'
          }
        }
      }
    }
  }
};

var changes = differ.diffProjects(oldProjects, projects);
console.log(changes);
[
  {
    change: 'project.create',
    projectId: '0',
    project: {
      name: 'demo',
      version: 0,
      schemas: {
        '1': {
          name: 'users',
          primary: '1',
          columns: {
            '1': {
              name: 'id',
              type: 'uuid'
            }
          }
        }
      }
    }
  }
]

API docs

API Docs

Licence

MIT