{"repo":"TimMikeladze/arango-migrate","free":true,"listed":false,"github":"https://github.com/TimMikeladze/arango-migrate","clone":"git clone https://github.com/TimMikeladze/arango-migrate.git","description":"🥑 Database migration tools and CLI for ArangoDB. Apply migrations in a transaction-safe manner with optional before/after hooks and dry-run support.","language":"TypeScript","stars":19,"topics":["arango","arangodb","migrations","database","database-management","migration","arango-migrate","javascript","typescript","arangodb-migrate"],"license":"MIT","category":"databases-storage","readme_excerpt":"arango-migrate Apply migrations to an ArangoDB in a transaction-safe manner with optional before/after hooks and dry-run support. Getting Started Note: Check out a functioning sample in the arango-migrate-example repository. Usage Configuration Create a config.migrate.js file in the root of your project. This file contains the database connection information and options for running migrations. Example: Initialize a new migration yarn arango-migrate -i new-migration-name This will create an empty migration file in the migrations directory. Simple migration example This migration will create new collections todo , user , an edge collection user todo and then insert documents in them. Additional lifecycle functions can be added to the migration file, see the full list of options below. If a collection does not exist it will be created by default (set autoCreateNewCollections option to false to disable this behavior). Running up migrations yarn arango-migrate -u Runs all un-applied migrations. yarn arango-migrate -u -t 2 Runs all un-applied migrations up to and including migration with version number 2. Understanding ArangoDB transactions and the step function Individual migrations are ran within a transaction in order to keep the database in a valid state if a migration fails. The migration's transaction is committed to ArangoDB after the up or down functions are executed. Observe how the second argument of the up and down functions is a function called step . This is a special ","default_branch":null,"files":null,"tree":[],"storefront":"/r/TimMikeladze","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/TimMikeladze/arango-migrate/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}