{"_id":"@clarityhub/serverless-dynamodb-migrations","_rev":"3-1cc4411aa2a1236210b9c3383beeb775","name":"@clarityhub/serverless-dynamodb-migrations","dist-tags":{"latest":"1.1.1"},"versions":{"1.0.0":{"name":"@clarityhub/serverless-dynamodb-migrations","version":"1.0.0","description":"Trigger DynamoDB migrations from AWS Lambda with Serverless ⚡️","main":"index.js","repository":{"type":"git","url":"git+https://github.com/clarityhub/serverless-dynamodb-migrations.git"},"author":{"name":"Clarity Hub","email":"opensource@clarityhub.io"},"license":"MIT","publishConfig":{"access":"public"},"scripts":{"precommit":"lint-staged","format":"prettier --write *.js","test":"jest"},"dependencies":{"umzug":"^2.0.1","umzug-dynamodb-storage":"^1.0.3"},"devDependencies":{"husky":"^0.14.3","jest":"^24.9.0","lint-staged":"^4.0.2","prettier":"^1.5.3"},"peerDependencies":{"aws-sdk":"^2"},"lint-staged":{"*.js":["prettier --write","git add"]},"gitHead":"388d7ff8e7ec040a54b84c0cc78551dc2a83211b","bugs":{"url":"https://github.com/clarityhub/serverless-dynamodb-migrations/issues"},"homepage":"https://github.com/clarityhub/serverless-dynamodb-migrations#readme","_id":"@clarityhub/serverless-dynamodb-migrations@1.0.0","_nodeVersion":"13.2.0","_npmVersion":"6.13.1","dist":{"integrity":"sha512-XQTVV6Tukre/x1kmJYy4x/zQU7SieIDyfUnpB7vV+ZQRb07GoZUv5PZMTNtVhZqO08PC5/Ng3rq+gnmDK3VqFA==","shasum":"6cb734b5f93223a04b14ccea55fab87ea774785f","tarball":"https://registry.npmjs.org/@clarityhub/serverless-dynamodb-migrations/-/serverless-dynamodb-migrations-1.0.0.tgz","fileCount":7,"unpackedSize":8897,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd4rMnCRA9TVsSAnZWagAATKUQAIrSulB7me0GmUfauu4P\nrwzYp/hGjfzWkcoE9SbhT8utG9ZaLChdd6gABggSmK32SUcoqnFpXvGFSAl5\ncWNPf9C9RrxgSjBl9jyEfy3PBO11B+c77k/RtPM4whHelV7nqfrbz0RNaJ+2\nGd6pMcSgVAQvg46iN/99WBJWzl0ZhkdcWPfxhzYiPVfP5DdyiETJcAGd0fmh\n0+BsCm00vhI423KTonvJK9hjz01nKmlNBJgJTHW9Tqyz+DY4gXMx3huypgoU\nAamN+S0iSDommtCdyUufbuYwpV7TmSXhSSuJPuUx+TH6bRfrLfc7wTWObn5e\niQoyyYbf2FRI6ETzMUT6J983vFxZdRklg3lY00K5BOQyvFBldruxwtEm3ZNv\nKh9jpvRsGpOimHNykMprffbjYxsM5Doqyc/4u4bUvgGvJ2ZR5g/LXqNmeWY1\n94wFl9+gPlZQLLdkZPh1ykvMDbLTolEMXIizMse5MGtfwZUTbp1WKwHmz+cz\n8VmMfv2CdvqsFyvWT80vwYl7PaJZ12TOc7MQ7RtrYXWeGEVBVFFmMxprdtQt\nCsPeqh9okXCmCR/faAArS1Xyv/FeTAGqr4ykBzuA8TYX6RlU0tsWSdoggcan\nMWsZmCyvcpF01o5Q5tRk5kk1BNgo+oXnHz6eGTnYPNGSqs4sHILSCuQuD5JO\nkPiK\r\n=+mBZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGYSjz74Viaj877Ok4TJjAxO97F0+QuSXOxJwrziryhTAiEAgmOkm202MV1JsFtxgYcA4/tCr6kYhQBhGfG3oOonPvM="}]},"maintainers":[{"name":"loukitzanna","email":"anna@clarityhub.io"},{"name":"idmontie","email":"idmontie@gmail.com"}],"_npmUser":{"name":"idmontie","email":"idmontie@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/serverless-dynamodb-migrations_1.0.0_1575138087074_0.43261690796396923"},"_hasShrinkwrap":false},"1.1.0":{"name":"@clarityhub/serverless-dynamodb-migrations","version":"1.1.0","description":"Trigger DynamoDB migrations from AWS Lambda with Serverless ⚡️","main":"index.js","repository":{"type":"git","url":"git+https://github.com/clarityhub/serverless-dynamodb-migrations.git"},"author":{"name":"Clarity Hub","email":"opensource@clarityhub.io"},"license":"MIT","publishConfig":{"access":"public"},"scripts":{"precommit":"lint-staged","format":"prettier --write *.js","test":"jest"},"dependencies":{"umzug":"^2.0.1","umzug-dynamodb-storage":"^1.0.3"},"devDependencies":{"husky":"^0.14.3","jest":"^24.9.0","lint-staged":"^4.0.2","prettier":"^1.5.3"},"peerDependencies":{"aws-sdk":"^2"},"lint-staged":{"*.js":["prettier --write","git add"]},"gitHead":"afa025dd136d2ec2a7600adcb58b774661c409ff","bugs":{"url":"https://github.com/clarityhub/serverless-dynamodb-migrations/issues"},"homepage":"https://github.com/clarityhub/serverless-dynamodb-migrations#readme","_id":"@clarityhub/serverless-dynamodb-migrations@1.1.0","_nodeVersion":"13.2.0","_npmVersion":"6.13.1","dist":{"integrity":"sha512-yiTeVs16E72dNKL220+Nw32BB07dTxDVLdBB3OGyPWHp3QytzFtEGuZk7QaS+LqjAfOfEniDnqNou/EWVRInDw==","shasum":"c27ac52879d8f77cca9bd6ddf31f0ba963c61261","tarball":"https://registry.npmjs.org/@clarityhub/serverless-dynamodb-migrations/-/serverless-dynamodb-migrations-1.1.0.tgz","fileCount":7,"unpackedSize":8897,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd4rPkCRA9TVsSAnZWagAAdfkQAJe8TzmDHi13mKriJ87o\n6IJ/5CsyhR8yUIiWL9lmHjlOS02VnZM+BaOE0RItKBCu8V/ZrFgWh4/SmnYv\nTe3Zar2/n6dCU9acdQ4LCSiLboEAOhVthU1OshBNvpJW6+JIZh8aaQ9pwOsv\ndZJ++FiGUuBdGi6WULbrwH6o8EdOVRGMamhtkELwpm5qyGV6EnCRtGYJJHpc\nxnEImiEHk1x8dikOnK8XrPYx2D24JaLoWN0OOjloXBsoTxq6C/Xj3Wq9j7kL\nLWENFxd84MuT9xkZc3vDJRcoT7muSuRVKpKja0txldlFd9Zw2me4plNAuPTK\nx8cYoCt4Lrg1tpR61AzOQEvzlI/BCWscdZBnA4w2qOnLen7GmnwQmnQ7yTKO\nSW/VOt4319XaJ3fbE4nHIc1Urfx60cW0KI0QBhCEiPyNCOFOY3oo5wbVlXqC\ndtZBIeAYHCbbQv4xEYXFbsolhYZiLw3CwvRK8tvYrd3pk/0Y/3VschiSqMAy\nF6F8qgFFuiqbj4exPqhItloLsTokPrY8QOBOklKpV/7+aMTXABiANMOS/cpO\n50umCBKwt0uL2le562w6IKSk1U5DEyCw68Xuc+hE+pkpbFNxu04nJ2kbgWUN\nmekWgMnE/uuJifiQT/1kPdEep7D7b+bDhlIY69462jdI53hsmREgw5WtboCX\nvtOc\r\n=lrVh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICiBtWsZyZrYdXiVQOtE67U1rHB3rb0xf0i+sjTReakcAiEAyZTvV9veti2tY9PO30wZUwOwHElRaVcwDf3yIm15aqQ="}]},"maintainers":[{"name":"idmontie","email":"idmontie@gmail.com"},{"name":"loukitzanna","email":"anna@clarityhub.io"}],"_npmUser":{"name":"idmontie","email":"idmontie@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/serverless-dynamodb-migrations_1.1.0_1575138275682_0.26299499201931176"},"_hasShrinkwrap":false},"1.1.1":{"name":"@clarityhub/serverless-dynamodb-migrations","version":"1.1.1","description":"Trigger DynamoDB migrations from AWS Lambda with Serverless ⚡️","main":"index.js","repository":{"type":"git","url":"git+https://github.com/clarityhub/serverless-dynamodb-migrations.git"},"author":{"name":"Clarity Hub","email":"opensource@clarityhub.io"},"license":"MIT","publishConfig":{"access":"public"},"scripts":{"precommit":"lint-staged","format":"prettier --write *.js","test":"jest"},"dependencies":{"umzug":"^2.0.1","umzug-dynamodb-storage":"^1.0.3"},"devDependencies":{"husky":"^0.14.3","jest":"^24.9.0","lint-staged":"^4.0.2","prettier":"^1.5.3"},"peerDependencies":{"aws-sdk":"^2"},"lint-staged":{"*.js":["prettier --write","git add"]},"gitHead":"712dcbf570d0c432ab09589d9b6e32558e08c857","bugs":{"url":"https://github.com/clarityhub/serverless-dynamodb-migrations/issues"},"homepage":"https://github.com/clarityhub/serverless-dynamodb-migrations#readme","_id":"@clarityhub/serverless-dynamodb-migrations@1.1.1","_nodeVersion":"13.2.0","_npmVersion":"6.13.1","dist":{"integrity":"sha512-wJXyAlG4x0zrFaO23QFeQRhdQPOAuG47JucRFxQdgAqcNwUYdNp69PKifDLJGF5j+sX65Mx2X3ffdQmsa+F2Pw==","shasum":"fc8d7f2227f0755104c86271ab5c07e2ba1bc343","tarball":"https://registry.npmjs.org/@clarityhub/serverless-dynamodb-migrations/-/serverless-dynamodb-migrations-1.1.1.tgz","fileCount":7,"unpackedSize":9031,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd4tEGCRA9TVsSAnZWagAAX3AP/Rf5D8QWI+FJghcbtbnM\nI/qLMMRl7OaOZssEgoE8Wds7j9Cn+Ctpf24fFJh26Gr1LTmWWoyDNx3M2Gud\nOuyAl+JKvtUfHtlaPq6cvwb2BJCD7tg9mHFo3HUxys6kSBtPqp8TxwXDMApH\n1lxdrhgVsir8WtpUlq0IDh/WMhCOzSE763XbCn6qJ3C8ZD8X/JvZelgo61jn\nnnDw+zMQxuglZVx+0BLq14kmtCPByMA1tyHVCQ+0bdif/G1ayQ4pLMpndupG\nTmYRSLJ6ML1Wj4XJjSc1PKLhFxtqlXvRJB8YQ2G3KLkMypPkSAnzDySTojOQ\nYCMjeCWWlpxa613nxhpbcxm3slcrIqHKq+o11uTEDUkG6LLd5j3Sp0pi+gsD\nQAADPtPQXevW8PZ6RgOk7JsU3v8lu7rvzMJ3Bo956cnZsJeUjkwC4D0U3tu5\n4jwelMJ9A4iFlUMOdvLDahKb1fNNC7yrBR5pZVyQdHLgT6f1CeXr2g0iwHxn\nA4KK2XSt/GpiP3IePHQUC5zcowW6QatNck7ZVAWbzizF5Lx6zlJ86Pt2ajWw\n7JdcIEtQkcESOT1Jt3OsoZ+3FxZd1uokdKjTLw8OKqe2rq4IrGIVp82M86Uw\nrpzo+G3WeCyoHVthhpxB54qmBG5ZcH1yPZRVJAJAnKUIwbfSIzwna+deWt/K\n6B+R\r\n=qdLT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDtBauC5enHGxexaZFg1ZprEvvcMorRyRqt+Nb/3kz4PAIgOtMg/KrqCAAZrGAZsuQEF07BELnD0K9NMdlxPjRYSgQ="}]},"maintainers":[{"name":"idmontie","email":"idmontie@gmail.com"},{"name":"loukitzanna","email":"anna@clarityhub.io"}],"_npmUser":{"name":"idmontie","email":"idmontie@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/serverless-dynamodb-migrations_1.1.1_1575145733871_0.020710363519938157"},"_hasShrinkwrap":false}},"time":{"created":"2019-11-30T18:21:26.863Z","1.0.0":"2019-11-30T18:21:27.208Z","modified":"2022-04-04T23:12:46.462Z","1.1.0":"2019-11-30T18:24:35.852Z","1.1.1":"2019-11-30T20:28:53.955Z"},"maintainers":[{"name":"idmontie","email":"idmontie@gmail.com"},{"name":"loukitzanna","email":"anna@clarityhub.io"}],"description":"Trigger DynamoDB migrations from AWS Lambda with Serverless ⚡️","homepage":"https://github.com/clarityhub/serverless-dynamodb-migrations#readme","repository":{"type":"git","url":"git+https://github.com/clarityhub/serverless-dynamodb-migrations.git"},"author":{"name":"Clarity Hub","email":"opensource@clarityhub.io"},"bugs":{"url":"https://github.com/clarityhub/serverless-dynamodb-migrations/issues"},"license":"MIT","readme":"# Serverless DynamoDB Migrations\n\n[![Build Status](https://travis-ci.org/clarityhub/serverless-dynamodb-migrations.svg?branch=master)](https://travis-ci.org/clarityhub/serverless-dynamodb-migrations)\n[![NPM version](https://badge.fury.io/js/%40clarityhub%2Fserverless-dynamodb-migrations.svg)](https://badge.fury.io/js/%40clarityhub%2Fserverless-dynamodb-migrations)\n\nDatabase migrations for AWS Lambda and DynamoDB using [DynamoDB Migrations](https://github.com/Floby/node-umzug-dynamodb-storage).\n\n## About\n\nThis Serverless plugin can execute and rollback database migrations after deploys. See [Usage](#usage). Forked from [serverless-pg-migrations](https://github.com/clarityhub/serverless-pg-migrations).\n\n> Heavily inspired by [transmogrify](https://github.com/Reckon-Limited/transmogrify). I tried to use it but encountered a lot of showstopping bugs for me, so I wrote my own, smaller and simpler version.\n\n**Notable differences from transmogrify:**\n\n* This plugin does not attempt to add handlers automatically (see [Adding handlers](#adding-handlers))\n* This plugin does not create or drop databases\n* This plugin does not have a handler for checking database connection\n\n## Migrations\n\nThe plugin assumes that migration files live in a `migrations` directory inside your project.\n\n## Installation\n\n`yarn add @clarityhub/serverless-dynamodb-migrations` OR `npm i --save @clarityhub/serverless-dynamodb-migrations`\n\n## Usage\n\nDefine a migration handler somewhere in your project. Example:\n\n```js\n// /migrations.js\n\nconst { up, down } = require(\"@clarityhub/serverless-dynamodb-migrations/handlers\");\n\nmodule.exports.up = up;\n\nmodule.exports.down = down;\n```\n\nAdd the plugin and handlers to your `serverless.yml`:\n\n```yml\nprovider:\n  name: aws\n\nplugins:\n  - \"@clarityhub/serverless-dynamodb-migrations\"\n\nfunctions:\n  up:\n    handler: migrations.up\n    timeout: 30\n    environment:\n      MIGRATION_TABLE: migrations\n  down:\n    handler: migrations.down\n    timeout: 30\n    environment:\n      MIGRATION_TABLE: migrations\n```\n\nPass the function to the serverless deploy command to have it execute after the deploy is finished:\n\n```bash\nsls deploy --function up\n```\n\nYou can also manually invoke the functions locally:\n\n```bash\nsls invoke local --function up\n```\n\nOr use the plugin directly without going through your function:\n\n```bash\nsls migrate up\nsls migrate down\n```\n\n## Configuration\n\nThe provided migration handlers can be imported with `const { up, down} = require(\"@clarityhub/serverless-dynamodb-migrations/handlers\")`.\n\nThe functions need to have the environment variable `MIGRATION_TABLE` set to the DynamoDB table name you want to use. If the table doesn't exist, the migrations will create the table for you. You can use [resources](https://serverless-stack.com/chapters/configure-dynamodb-in-serverless.html) to create one if you want though.\n","readmeFilename":"README.md"}