Socket
Book a DemoInstallSign in
Socket

versiondb-cli

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

versiondb-cli

Command line interface for versiondb

latest
Source
npmnpm
Version
0.1.1
Version published
Maintainers
1
Created
Source

Version DB

A command line utility for maintaining the schema version of a database.

How it works

Version DB includes a single table in that target database that tracks which version of each product's database schema resides in the database. Every time it is run, it checks what version of a product's database schema is on the database, checks the schema file, and runs all of the scripts required to bring the database schema up to the latest version.

If a product does not exist in the database, all of the scripts will be run on the database to create a schema that is the latest version.

Installation

npm install -g versiondb-cli

Usage

To check what schemas are currently installed on a database

versiondb pg://user@password:localhost/database

To run upgrade scripts

versiondb pg://user@password:localhost/database scripts.json

JSON format

{
	"productname": {
		"1.0.0": "createscript.sql",
		"1.0.1": "upgradescript-1.0.1.sql",
		"1.0.2": "fix-table.sql"
	},
	"otherproduct": {
		"2.0.0": "createother.sql"
	}
}

For more information on the versiondb file bundle format, see VersionDB File Bundle.

FAQs

Package last updated on 12 Mar 2013

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