1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00
unleash.unleash/unleash-server/migrations/20141020151056-initial-schema.js
2020-02-20 08:30:06 +01:00

13 lines
423 B
JavaScript

var fs = require('fs');
var util = require('util');
var path = require('path').resolve(__dirname, 'sql/001-initial-schema.%s.sql');
exports.up = function(db, callback) {
var content = fs.readFileSync(util.format(path, 'up'), {encoding: 'utf8'});
db.runSql(content, callback);
};
exports.down = function(db, callback) {
db.runSql(fs.readFileSync(util.format(path, 'down'), {encoding: 'utf8'}), callback);
};