-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
73 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} |