Explorar o código

remove down from abolish-crowi-classic-auth

mizozobu %!s(int64=6) %!d(string=hai) anos
pai
achega
a9f5417745
Modificáronse 1 ficheiros con 2 adicións e 12 borrados
  1. 2 12
      src/migrations/20190618055300-abolish-crowi-classic-auth.js

+ 2 - 12
src/migrations/20190618055300-abolish-crowi-classic-auth.js

@@ -29,17 +29,7 @@ module.exports = {
   },
   },
 
 
   async down(db, next) {
   async down(db, next) {
-    logger.info('Rollback migration');
-    mongoose.connect(config.mongoUri, config.mongodb.options);
-
-    const Config = getModelSafely('Config') || require('@server/models/config')();
-
-    await Config.findOneAndUpdate(
-      { ns: 'crowi', key: 'security:isEnabledPassport' },
-      { ns: 'crowi', key: 'security:isEnabledPassport', value: JSON.stringify(false) },
-      { upsert: true },
-    );
-
-    logger.info('Migration has been successfully rollbacked');
+    // do not rollback
+    next();
   },
   },
 };
 };