{"_id":"@2012mjm/sails-db-migrate","_rev":"1-296d6b56c60791a50526e91c978636c4","name":"@2012mjm/sails-db-migrate","dist-tags":{"latest":"1.5.1"},"versions":{"1.5.1":{"name":"@2012mjm/sails-db-migrate","version":"1.5.1","description":"db-migrate integration for sails.js","main":"index.js","repository":{"type":"git","url":"git+https://github.com/2012mjm/sails-db-migrate.git"},"keywords":["sails","database","migrations"],"author":{"name":"David M. Lee, II"},"licenses":"MIT","bugs":{"url":"https://github.com/building5/sails-db-migrate/issues"},"homepage":"https://github.com/building5/sails-db-migrate","dependencies":{},"devDependencies":{},"peerDependencies":{"db-migrate":">0.7.0 <0.11 || >=0.10.0-beta.4 <0.11","sails":">0.10.4 <0.13 || >=0.12.0-rc3 <0.13"},"gitHead":"9230b3dd2a5c35466ae4deeb2c8d56a51d875f1c","_id":"@2012mjm/sails-db-migrate@1.5.1","_npmVersion":"5.5.1","_nodeVersion":"8.9.3","_npmUser":{"name":"2012mjm","email":"2007mjm@gmail.com"},"dist":{"integrity":"sha512-KU56hWiWiRXgL6dgbQGd34C8ZxrIxLAUpp4H1mxokLdsKFrsokn0Y3S7AhelkP72v9BTraLw0OySI14aPLVRHA==","shasum":"e8d6444dd1a76a179295e6c5e729bb9add8e5300","tarball":"https://registry.npmjs.org/@2012mjm/sails-db-migrate/-/sails-db-migrate-1.5.1.tgz","fileCount":8,"unpackedSize":16525,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb+WYNCRA9TVsSAnZWagAAwiYP/0zp7WaBj6a9WO2BaXk2\ngqbvUsrYeshgIKL+Y5OuiqCUcGEZMeJPRQwwoBuaWJTO694w7nZNblez5SSl\nNqwKKGrrS9THI5GFf+WkXuLsgXqvOYw4B0o70//rAB4Ru9hQ/Rm01RZ+3Fcs\nP8vsCPP+8uAlGXiDoBvhP/XIxzOB76mM7S+SewLbsOcW6DDbTSrDaWWvxnOT\nMOv42JmEGrX+6ZTTMWQTvqtgTSqKrMFJdDDp27HUSSQHgu3xL+6uxi8pdhok\nb+zjL8vWD1pfbuud8yZUvODoZMlZoJ0f5UD+ejZmIW67zzcjWBPpO/GewkiO\nrQ9pyxKAxwF0JUJHKEDhYGA19I9yZqZ+tGQ3HhAdf7Hi9ecWKR5qBFl7hgFE\nVJTpS++DegZabfGQgF1SAL6FvevJY5+DMEC1VJZ+KmFSTqPUeYKmd0HulIUk\nA4oQOjh2CS/HBi7lwIQmK/2z4hnv6oOcfxy40lzlfN6J2cliOdxF1CO6J1a0\nAqQtbH6ej4dVWkwXGIm1hOki9hLKR7rZReVAZCI0cvmipKQSj4G6y/uKc2pA\nE67foFKh7RXhzikvrJ0TURAdy/K0zc1a4vrXvBDF2YVfe9YJdncffdaH5OL9\nTQhBFzFxDD99y5jZIGogSCu8gnSlPtL7T1cjCy96kbvDoi0qAjsLgU+rIsnC\nE05H\r\n=fmZ7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB10sAXEsA0/R4uOekNL5+KcJxtKY7bdoz+9QKjb2XtGAiALVlYMyn7WyBdE380kBou+mVPg9MKzQaqvCAfQZB+ofg=="}]},"maintainers":[{"name":"2012mjm","email":"2007mjm@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sails-db-migrate_1.5.1_1543071244998_0.7798526160735073"},"_hasShrinkwrap":false}},"time":{"created":"2018-11-24T14:54:04.829Z","1.5.1":"2018-11-24T14:54:05.145Z","modified":"2022-04-04T10:35:03.253Z"},"maintainers":[{"name":"2012mjm","email":"2007mjm@gmail.com"}],"description":"db-migrate integration for sails.js","homepage":"https://github.com/building5/sails-db-migrate","keywords":["sails","database","migrations"],"repository":{"type":"git","url":"git+https://github.com/2012mjm/sails-db-migrate.git"},"author":{"name":"David M. Lee, II"},"bugs":{"url":"https://github.com/building5/sails-db-migrate/issues"},"readme":"# sails-db-migrate\n[![devDependency Status](https://david-dm.org/building5/sails-db-migrate/dev-status.svg)](https://david-dm.org/building5/sails-db-migrate#info=devDependencies)\n[![peerDependency Status](https://david-dm.org/building5/sails-db-migrate/peer-status.svg)](https://david-dm.org/building5/sails-db-migrate#info=peerDependencies)\n\n[db-migrate][] integration for [Sails.js][]. This is a fairly simple wrapper,\nwhich provides [grunt][] tasks for running and creating migrations. It also\nextracts the database configuration from the Sails config, so you don't have to\nduplicate you config in a `database.json` file.\n\nSupports Sails 0.10.x.\n\n## Setup\n\nInstallation is very typical.\n\n```bash\n$ npm install --save sails-db-migrate\n```\n\nYou may also have to explicitly install your database driver. Normallys it's\ninstalled under `sails-{postgresql,mysql}`, but that won't be found outside of\nthat package.\n\n```bash\n$ npm install --save pg # or mysql\n```\n\nYou need to setup `config/migrations.js` to name the connection which you will\nuse to run migrations.\n\n```JavaScript\n// config/migrations.js\nmodule.exports.migrations = {\n  // connection name matches a field from config/connections.js\n  connection: 'somePostgresqlServer' // or MySQL\n};\n```\n\nOptionally, you can specify in the config file the name of the database table to\nbe used to track migrations (defaults to `migrations`), the directory to use for\nmigrations (defaults to `migrations`), and whether to create a coffeescript\nfile for the migrations instead of javascript file (defaults to `false`).\n\n```JavaScript\n// config/migrations.js\nmodule.exports.migrations = {\n  // connection name matches a field from config/connections.js\n  connection: 'somePostgresqlServer', // or MySQL\n  table: 'sails_migrations',\n  migrationsDir: 'sails_migrations',\n  coffeeFile: true\n};\n```\n\nYou'll also need to setup `tasks/register/dbMigrate.js` to add the `db:migrate`\ntasks to grunt.\n\n```JavaScript\n// tasks/register/dbMigrate.js\nmodule.exports = require('sails-db-migrate').gruntTasks;\n```\n\n## Usage\n\n### Help\n\nHelp can be found by running `grunt db:migrate`.\n\n```bash\n$ grunt db:migrate\n```\n\n### Creating migrations\n\nYou create migrations using the `grunt db:migrate:create`\n\n```bash\n$ grunt db:migrate:create --name add-some-fooz\n\n+ db-migrate create add-some-fooz\n[INFO] Created migration at /Users/dlee/prj/test/migrations/20140829025723-add-some-fooz.js\n\nDone, without errors.\n```\n\nYou can edit your new migration file. This is fully documented in the\n[db-migrate docs][].\n\n### Running migrations\n\nMigrations can be run up or down. To run only a certain number of migrations,\nspecify the `--count` flag.`\n\n```bash\n$ grunt db:migrate:up\nRunning \"db:migrate:up\" (db:migrate) task\n+ db-migrate up\n[INFO] Processed migration 20140829025723-add-some-fooz\n[INFO] Done\n\nDone, without errors.\n\n$ grunt db:migrate:down --count 2\nRunning \"db:migrate:down\" (db:migrate) task\n+ db-migrate down --count 2\n[INFO] Processed migration 20140829025723-add-some-fooz\n[INFO] Processed migration 20140829025008-init\n[INFO] Done\n\nDone, without errors.\n```\n\nTo specify your own migrations directory, use `--migrations-dir`.\n\n```bash\n$ grunt db:migrate:up --migrations-dir=migrations-special\n```\n\n### Debugging\n\nNormally, migrations load Sails with a log level of `silent`, since you usually\ndon't need it. Sometimes, however, Sails will fail to load, and some debug\noutput would be nice.\n\nYou can set the `LOG_LEVEL` environment variable to turn up sails logging for\nthe migrations\n\n```bash\n$ LOG_LEVEL=debug grunt db:migrate:up\n```\n\n### Patches Welcome\n\nIf you'd like to contribute to sails-db-migrate, start by looking at some of the\n[open issues][] in the issue tracker.\n\n [db-migrate]: https://github.com/kunklejr/node-db-migrate\n [sails.js]: http://sailsjs.org/\n [grunt]: http://gruntjs.com/\n [db-migrate docs]: https://github.com/kunklejr/node-db-migrate#migrations-api\n [open issues]: https://github.com/building5/sails-db-migrate/issues\n","readmeFilename":"README.md"}