npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

arangomigration

v1.0.3

Published

ArangoDB migration cli tool

Downloads

7

Readme

Arango Migration Tool

This tool will help you to manage your ArangoDB with migration file to easily create users, document, indexes & views from a simple folder with yaml files.

It can also insert default data from the same folder.

Getting started

1. Installation

# install localy, so you can use it with npx in your folder
npm install arangomigration

# or install globaly to get access to the cli from anywhere
npm install -g arangomigration

2. Add some migration files

  1. Create a migration folder at your project root
  2. Add yaml files in semvers format with a name: x.x.x-add-a-collection.yml

Your folder should look like this:

./migration
├── 1.0.0-mvp-needs.yml
└── 1.0.1-add-missing-index.yml

3. Write a migration file

database: my-database

create:
  users:
    - username: user1
      password: usernamepassword
  collection:
    - name: dogs
    - name: dogSitter
  edgeCollection:
    - name: dogSitterDogs
  indexes:
    - name: oneDogSitterForADog
      collection: dogSitterDogs
      type: persistent
      unique: true
      fields:
        - _from
        - _to

This migration file will do:

  1. Create my-database database if not exist
  2. Create user1 user in _system database
  3. Create a collection and an edge collection
  4. Create a persistent index on the edgeCollection dogSitterDogs to ensure that a dog has only a dog sitter

Run migration

This tool is a cli, so you can basicly use this command line

(npx) arangomigration migrate

Main commands

$ arangomigration arangomigration --help

Usage: arangomigration [options] [command]

Options:
  -v, --version                 output the version number
  -h, --help                    display help for command

Commands:
  apply [options] [directory]   Apply all migration files from a directory
  status [options] [directory]  Check local file and compare to previously applied migration
  help [command]                display help for command

Apply command

$ arangomigration apply --help

Usage: arangomigration apply [options] [directory]

Apply all migration files from a directory

Options:
  --url <url>              URL of your database (default: "http://localhost:8529")
  --username <username>    System username (default: "root")
  --password <password>    System user password (default: "root")
  --insert-data <boolean>  Insert data from ~/your-migration-folder/data (default: true)
  -h, --help               display help for command

Status command

$ arangomigration status --help

Usage: arangomigration status [options] [directory]

Check local file and compare to previously applied migration

Options:
  --url <url>            URL of your database (default: "http://localhost:8529")
  --username <username>  System username (default: "root")
  --password <password>  System user password (default: "root")
  -h, --help             display help for command