Skip to content

Commit

Permalink
refactor(datatype): move dataType into new extern lib
Browse files Browse the repository at this point in the history
Refers to #382
  • Loading branch information
wzrdtales committed Jun 22, 2016
1 parent 2ed5967 commit 2d99d63
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var pkginfo = require('pkginfo')(module, 'version'); // jshint ignore:line

exports.dataType = require('./lib/data_type');
exports.dataType = require('db-migrate-shared').dataType;


/**
Expand Down
2 changes: 1 addition & 1 deletion lib/driver/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ var internals = {};

internals.mod = internals.mod || {};
internals.mod.log = require('db-migrate-shared').log;
internals.mod.type = require('../data_type');
internals.mod.type = require('db-migrate-shared').dataType;
var Shadow = require('./shadow');
var log = internals.mod.log;
var tunnel = require('tunnel-ssh'),
Expand Down
2 changes: 1 addition & 1 deletion test/driver/base_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ var internals = {
migrationTable: 'migrations',
mod: {
log: require('db-migrate-shared').log,
type: require('../../lib/data_type.js')
type: require('db-migrate-shared').dataType
}
};

Expand Down
3 changes: 1 addition & 2 deletions test/driver/mongodb_test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var vows = require('vows');
var assert = require('assert');
var dbmeta = require('db-meta');
var dataType = require('../../lib/data_type');
var dataType = require('db-migrate-shared').dataType;
var driver = require('../../lib/driver');

var config = require('../db.config.json').mongodb;
Expand Down Expand Up @@ -342,4 +342,3 @@ driver.connect(config, internals, function(err, db) {
})
.export(module);
});

2 changes: 1 addition & 1 deletion test/driver/mysql_test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var vows = require('vows');
var assert = require('assert');
var dbmeta = require('db-meta');
var dataType = require('../../lib/data_type');
var dataType = require('db-migrate-shared').dataType;
var driver = require('../../lib/driver');
var log = require('db-migrate-shared').log;

Expand Down
2 changes: 1 addition & 1 deletion test/driver/pg_schema_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var Promise = require('bluebird');
var assert = require('assert');
var dbmeta = require('db-meta');
var pg = require('pg');
var dataType = require('../../lib/data_type');
var dataType = require('db-migrate-shared').dataType;
var driver = require('../../lib/driver');

var databaseUrl = 'postgres://localhost/db_migrate_test';
Expand Down
2 changes: 1 addition & 1 deletion test/driver/pg_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ var util = require('util');
var vows = require('vows');
var assert = require('assert');
var dbmeta = require('db-meta');
var dataType = require('../../lib/data_type');
var dataType = require('db-migrate-shared').dataType;
var driver = require('../../lib/driver');
var log = require('db-migrate-shared').log;

Expand Down
2 changes: 1 addition & 1 deletion test/driver/sqlite3_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ var fs = require('fs');
var vows = require('vows');
var assert = require('assert');
var dbmeta = require('db-meta');
var dataType = require('../../lib/data_type');
var dataType = require('db-migrate-shared').dataType;
var driver = require('../../lib/driver');

var config = require('../db.config.json').sqlite3;
Expand Down

0 comments on commit 2d99d63

Please sign in to comment.