Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ektorp

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ektorp

Migrations framework for CouchDB. Some assembly required!

  • 0.0.1-alpha8
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
increased by200%
Maintainers
1
Weekly downloads
 
Created
Source

Ektorp

Some assembly required.

Ektorp is a node.js library and command-line utility for building your CouchDB.

Project Status

Ektorp is incomplete but we have a number of tests, and most of them are passing. :-)

Build Status

Using Ektorp
From the command-line:
  1. Install ektorp globally:

    $ npm install -g ektorp

  2. Run ektorp:

    $ ektorp http://localhost:5984/new_db ./migrations

  3. Relax!

From your own code:

To integrate ektorp and control more aspects of the migration:

  1. Install ektorp (doesn't need to be installed globally if you don't want to use the CLI tool):

    $ npm install ektorp

  2. Leverage ektorp in your own bootstrap script:

    var ektorp = require('ektorp');
    
    //pass the url to the DB you want to upgrade, and the path to migrations:
    var migrator = ektorp('http://localhost:5984/new_db', './migrations');
    
    migrator.on('done', function(){ console.log('Migrations are done!'); });
    
    //cause the migrator to start.
    migrator.start();
    
How do I write a migration?

Here's one way that is supported (there are others that will be documented soon):

  1. Create a directory:

    $ mkdir ./migrations

  2. Make a migration:

    $ cd ./migrations
    $ touch 201401310849_first_migration.json
    
  3. You can put a JSON array or object in 201401310849_first_migration.json, it will be pushed to the database when you run ektorp.

Keywords

FAQs

Package last updated on 12 Feb 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc