{"_id":"@bakjs/sequelize-auto-migrations","_rev":"2-cf2065fcadebb2a7f18e37f12c26f36a","name":"@bakjs/sequelize-auto-migrations","dist-tags":{"latest":"1.1.0"},"versions":{"1.1.0":{"name":"@bakjs/sequelize-auto-migrations","version":"1.1.0","description":"Sequelize migrations generator && runner","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/flexxnn/sequelize-auto-migrations.git"},"keywords":["sequelize","migrations","migration","database","db","sql"],"author":{"name":"Michael Maslov"},"license":"MIT","bugs":{"url":"https://github.com/flexxnn/sequelize-auto-migrations/issues"},"homepage":"https://github.com/flexxnn/sequelize-auto-migrations#readme","dependencies":{"async":"^2.5.0","command-line-args":"^4.0.6","deep-diff":"^0.3.8","js-beautify":"^1.6.14","lodash":"^4.17.4","object-hash":"^1.1.8","sequelize":"^4.3.2"},"gitHead":"ac8491bb32258359bb69002e23664a14993b7903","_id":"@bakjs/sequelize-auto-migrations@1.1.0","_npmVersion":"5.6.0","_nodeVersion":"8.11.3","_npmUser":{"name":"pi0","email":"pyapar@gmail.com"},"dist":{"integrity":"sha512-Pyks7falv0C5u+4wguH8982eX6UwMSTiyF618qRm1Imgv3zcJsxGTB4GBcu+nKP+SspFAbu00XU5NfvV938Z8g==","shasum":"51634fe0d8258e1b50eb216663d392ca99f30e75","tarball":"https://registry.npmjs.org/@bakjs/sequelize-auto-migrations/-/sequelize-auto-migrations-1.1.0.tgz","fileCount":7,"unpackedSize":35104,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbUzgpCRA9TVsSAnZWagAAd4kP/AwAP58kSF2FVGtco1kE\nXxQz1XVLU8dd02t6hC/yfry+U6CwWgUj9XOgGKShO5uWvUlscKUEF2qOpt4E\nPsrua7FC39doEV9UgRfDDidKajbTJRHx70w/3/i7c9h1YDCbfdQY94HBZfHE\nmpm7OhRtx5erhPyX89GyEI/DCtQOzjVOkEqeU7QKQ4bn7TGqJSNqEQb9bQNp\n4wSGiexnXbghJpd+JvsKe8uzlfb3D8twCe8hIXAri5aiZxneefGBsLHf7u0l\nPlsaeccOpWa6H9WzMsc75qkGs/ruLlTpgh9nNSxP6LUL0R57zU6Fru50w7MW\noyH5vkPyieaglvfHRq77TZ0uFrjrBX1FwCtGRttQ70tQf5u7/GeoaSzQYJQA\nTnA+Yuug9PgIPIUGwgYrKJw8k0CtNvj8AsA8GRkMZ8PfGDciS7mqgumeablN\nVZbVKuBz9A184+Vud6kTWYuSKcRXpHj/DLRJR07JZomDv6az7YdVooNgtvf1\nA5morGU7tLrR2M0vZ8N35M/ihn8Ua/oAhOoOhAi7jKYFDCWDvLzWs68lbQXT\nXpdvs5SeAGMjFXcFPOK8BZ0xENxzZ/K3Spro6EemEgeSC+51YfRxVej2k45F\nMpwzmwGEcTETku1JliuJxxuqMInAgb9AiWf53eFZUVU5azoe+RAh20TPEVFB\n2sla\r\n=dFzJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCm9CGqK8b2zhc8EagJLt6cBe9dgaggC6SglgyB1lvB2QIgU0LEO61k+VdKbqHfvs1Ra7GAqBmzbfGycaLtAvcoByM="}]},"maintainers":[{"name":"pi0","email":"pyapar@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sequelize-auto-migrations_1.1.0_1532180521416_0.5347966593877846"},"_hasShrinkwrap":false}},"time":{"created":"2018-07-21T13:42:01.312Z","1.1.0":"2018-07-21T13:42:01.791Z","modified":"2022-04-04T17:32:14.152Z"},"maintainers":[{"email":"farnabaz@gmail.com","name":"farnabaz"},{"email":"pyapar@gmail.com","name":"pi0"}],"description":"Sequelize migrations generator && runner","homepage":"https://github.com/flexxnn/sequelize-auto-migrations#readme","keywords":["sequelize","migrations","migration","database","db","sql"],"repository":{"type":"git","url":"git+https://github.com/flexxnn/sequelize-auto-migrations.git"},"author":{"name":"Michael Maslov"},"bugs":{"url":"https://github.com/flexxnn/sequelize-auto-migrations/issues"},"license":"MIT","readme":"# sequelize-auto-migrations\nMigration generator &amp;&amp; runner for sequelize\n\nThis package provide two tools:\n* `makemigration` - tool for create new migrations\n* `runmigration` - tool for apply created by first tool migrations\n\n## Install\n`npm install sequelize-auto-migrations`\n\n## Usage\n* Init sequelize, with sequelize-cli, using `sequelize init`\n* Create your models\n* Create initial migration - run:\n\n`node ./node_modules/sequelize-auto-migrations/bin/makemigration --name <migration name>`\n* Change models and run it again, model difference will be saved to the next migration\n\nTo preview new migration, without any changes, you can run:\n\n`node ./node_modules/sequelize-auto-migrations/bin/makemigration --preview`\n\n`makemigration` tool creates `_current.json` file in `migrations` dir, that is used to calculate difference to the next migration. Do not remove it!\n\nTo create and then execute migration, use:\n`makemigration --name <name> -x`\n\n## Executing migrations\n* There is simple command to perform all created migrations (from selected revision):\n\n`node ./node_modules/sequelize-auto-migrations/bin/runmigration`\n* To select a revision, use `--rev <x>`\n* If migration fails, you can continue, use `--pos <x>`\n* To prevent execution next migrations, use `--one`\n\n\nFor more information, use `makemigration --help`, `runmigration --help`\n\n## TODO:\n* Migration action sorting procedure need some fixes. When many foreign keys in tables, there is a bug with action order. Now, please check it manually (`--preview` option)\n* Need to check (and maybe fix) field types: `BLOB`, `RANGE`, `ARRAY`, `GEOMETRY`, `GEOGRAPHY`\n* Downgrade is not supported, add it\n* This module tested with postgresql (I use it with my projects). Test with mysql and sqlite.\n","readmeFilename":"README.md"}