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
16 lines
578 B
JavaScript
16 lines
578 B
JavaScript
'use strict';
|
|
|
|
exports.up = function(db, callback) {
|
|
db.all('SELECT id FROM users', function (error, results) {
|
|
if (error) return callback(error);
|
|
|
|
// existing cloudrons have email enabled by default. future cloudrons will have it disabled by default
|
|
var enable = results.length !== 0;
|
|
db.runSql('INSERT settings (name, value) VALUES("mail_config", ?)', [ JSON.stringify({ enabled: enable }) ], callback);
|
|
});
|
|
};
|
|
|
|
exports.down = function(db, callback) {
|
|
db.runSql('DELETE * FROM settings WHERE name="mail_config"', [ ], callback);
|
|
};
|