Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
wzrdtales committed Jun 25, 2017
1 parent 98b7f79 commit 79c6509
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 1 deletion.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
[![Build Status](https://travis-ci.org/db-migrate/cockroachdb.svg?branch=master)](https://travis-ci.org/db-migrate/cockroachdb)
[![Dependency Status](https://david-dm.org/db-migrate/cockroachdb.svg)](https://david-dm.org/db-migrate/cockroachdb)
[![devDependency Status](https://david-dm.org/db-migrate/cockroachdb/dev-status.svg)](https://david-dm.org/db-migrate/cockroachdb#info=devDependencies)


# cockroachdb
A cockroachdb driver.
cockroachdb driver for db-migrate

## Installation

```
npm install db-migrate-cockroachdb
```
24 changes: 24 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
var Base = require('db-migrate-pg'),
pg = require('pg'),
log,
type,
Promise = require('bluebird');

var CockroachDriver = Base.extend({

init: function(connection, schema, intern) {

this._super(connection, schema, intern);
}
});


exports.connect = function(config, intern, callback) {

log = intern.mod.log;
type = intern.mod.type;

if (config.native) { pg = pg.native; }
var db = config.db || new pg.Client(config);
callback(null, new PgDriver(db, config.database, intern));
};
37 changes: 37 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"name": "db-migrate-cockroachdb",
"version": "1.0.0",
"description": "A cockroachdb driver for db-migrate.",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/db-migrate/cockroachdb.git"
},
"keywords": [
"db-migrate",
"dbmigrate",
"migrate",
"db",
"database",
"migration",
"driver",
"cockroach",
"roach",
"roachdb",
"cockroachdb"
],
"author": "Tobias Gurtzick <[email protected]>",
"license": "MIT",
"bugs": {
"url": "https://github.com/db-migrate/cockroachdb/issues"
},
"homepage": "https://github.com/db-migrate/cockroachdb#readme",
"dependencies": {
"bluebird": "^3.5.0",
"db-migrate-pg": "^0.1.11",
"pg": "^6.4.0"
}
}

0 comments on commit 79c6509

Please sign in to comment.