app.portBindings and newManifest.tcpPorts may be null
This commit is contained in:
15
migrations/20150430210225-settings-default-timezone.js
Normal file
15
migrations/20150430210225-settings-default-timezone.js
Normal file
@@ -0,0 +1,15 @@
|
||||
dbm = dbm || require('db-migrate');
|
||||
var safe = require('safetydance');
|
||||
var type = dbm.dataType;
|
||||
|
||||
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);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user