Skip to content

Instantly share code, notes, and snippets.

View paulmowat's full-sized avatar

Paul Mowat paulmowat

View GitHub Profile
@paulmowat
paulmowat / sequelize-schema-file-generator.js
Last active December 21, 2018 07:12
Sequelize Migration Generator from Models
// ////////////////////////////////
// How to use?
// 1. Make sure you've ran the `sequelize init` before (It should create `config`,`seeders`,`migrations` folders).
// 2. Run it with `node sequelize-schema-file-generator.js`
// 3. Review the generated migrations inside of the `migrations` folder.
// ////////////////////////////////
/* jscs:disable */
/* jshint ignore:start */
var path = require('path')