clear db ignoring foreign key checks

This commit is contained in:
Girish Ramakrishnan
2016-09-20 14:07:39 -07:00
parent cf039b7964
commit 7fde57f7de
5 changed files with 25 additions and 43 deletions

View File

@@ -17,7 +17,8 @@ exports = module.exports = {
getGroups: getGroups,
setGroups: setGroups,
_clear: clear
_clear: clear,
_addDefaultGroups: addDefaultGroups
};
var assert = require('assert'),
@@ -214,3 +215,7 @@ function isMember(groupId, userId, callback) {
callback(null, result.length !== 0);
});
}
function addDefaultGroups(callback) {
add('admin', 'admin', callback);
}