|
|
@@ -270,12 +270,16 @@ module.exports = (crowi) => {
|
|
|
*/
|
|
|
try {
|
|
|
(async() => {
|
|
|
+ const isV5Compatible = crowi.configManager.getConfig('crowi', 'app:isV5Compatible');
|
|
|
+
|
|
|
// set isV5Compatible to false
|
|
|
- await crowi.configManager.updateConfigsInTheSameNamespace('crowi', { 'app:isV5Compatible': false });
|
|
|
+ if (isV5Compatible) await crowi.configManager.updateConfigsInTheSameNamespace('crowi', { 'app:isV5Compatible': false });
|
|
|
+
|
|
|
// import
|
|
|
await importService.import(collections, importSettingsMap);
|
|
|
+
|
|
|
// run v5InitialMigration
|
|
|
- await crowi.pageService.v5InitialMigration();
|
|
|
+ if (isV5Compatible) await crowi.pageService.v5InitialMigration();
|
|
|
})();
|
|
|
}
|
|
|
catch (err) {
|