mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-13 20:57:24 +01:00
fix(migrations): return to generic state
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
var migrationName = '20170601_takeThis.js'; // Update per month
|
||||
var migrationName = '20170502_takeThis.js'; // Update per month
|
||||
var authorName = 'Sabe'; // in case script author needs to know when their ...
|
||||
var authorUuid = '7f14ed62-5408-4e1b-be83-ada62d504931'; //... own data is done
|
||||
|
||||
@@ -7,14 +7,14 @@ var authorUuid = '7f14ed62-5408-4e1b-be83-ada62d504931'; //... own data is done
|
||||
*/
|
||||
|
||||
var monk = require('monk');
|
||||
var connectionString = 'mongodb://sabrecat:hzpGJTRBn28KBZp@ds013393-a1.mlab.com:13393/habitica?auto_reconnect=true';
|
||||
var connectionString = 'mongodb://localhost:27017/habitrpg?auto_reconnect=true'; // FOR TEST DATABASE
|
||||
var dbUsers = monk(connectionString).get('users', { castIds: false });
|
||||
|
||||
function processUsers(lastId) {
|
||||
// specify a query to limit the affected users (empty for all users):
|
||||
var query = {
|
||||
'migration':{$ne:migrationName},
|
||||
'challenges':{$in:['87923188-f298-41ba-95ea-cbfa712ed95b']} // Update per month
|
||||
'challenges':{$in:['69999331-d4ea-45a0-8c3f-f725d22b56c8']} // Update per month
|
||||
};
|
||||
|
||||
if (lastId) {
|
||||
|
||||
Reference in New Issue
Block a user