We use only mysql, so updating this means a lot of unused db backends like sqlite do not need to be built with gyp anymore. Note that this version is not yet released as stable, but works fine for us. The outstanding issues are not related to our use-case from what I can tell. Fixes #82
15 lines
414 B
JavaScript
15 lines
414 B
JavaScript
'use strict';
|
|
|
|
var safe = require('safetydance');
|
|
|
|
exports.up = function(db, callback) {
|
|
var tz = safe.fs.readFileSync('/etc/timezone', 'utf8');
|
|
tz = tz ? tz.trim() : 'America/Los_Angeles';
|
|
|
|
db.runSql('INSERT settings (name, value) VALUES("time_zone", ?)', [ tz ], callback);
|
|
};
|
|
|
|
exports.down = function(db, callback) {
|
|
db.runSql('DELETE * FROM settings WHERE name="time_zone"', [ ], callback);
|
|
};
|