Merged migrations into one big v1->v2 which is not incremental, thus it does not need code copy-pasting.
Some fixes.
This commit is contained in:
parent
32cad03f4f
commit
b1c667d13d
24 changed files with 977 additions and 1044 deletions
|
@ -176,7 +176,6 @@ async function createFiles(context, type, subType, entityId, files, replacementB
|
|||
filename: file.filename,
|
||||
originalname: originalName,
|
||||
mimetype: file.mimetype,
|
||||
encoding: file.encoding,
|
||||
size: file.size
|
||||
});
|
||||
|
||||
|
@ -200,8 +199,8 @@ async function createFiles(context, type, subType, entityId, files, replacementB
|
|||
}
|
||||
|
||||
if (replacementBehavior === ReplacementBehavior.REPLACE) {
|
||||
const idsToRemove = [];
|
||||
for (const row of existingNamesRows) {
|
||||
const idsToRemove = [];
|
||||
if (processedNameSet.has(row.originalname)) {
|
||||
removedFiles.push(row);
|
||||
idsToRemove.push(row.id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue