chore: Upgrade data structure only if S3 is enabled
This commit is contained in:
@@ -907,6 +907,10 @@ const upgradeFileAttachments = async () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const upgradeDataStructure = async () => {
|
const upgradeDataStructure = async () => {
|
||||||
|
if (!sails.hooks.s3.isEnabled()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const fileManager = sails.hooks['file-manager'].getInstance();
|
const fileManager = sails.hooks['file-manager'].getInstance();
|
||||||
|
|
||||||
await fileManager.renameDir(PrevPathSegments.FAVICONS, sails.config.custom.faviconsPathSegment);
|
await fileManager.renameDir(PrevPathSegments.FAVICONS, sails.config.custom.faviconsPathSegment);
|
||||||
|
|||||||
Reference in New Issue
Block a user