fix (backend): add alias to a migration subquery

Co-authored-by: naskya <m@naskya.net>
This commit is contained in:
sup39 2024-03-17 23:13:54 +09:00 committed by naskya
parent a72999c872
commit 9bce737f67
No known key found for this signature in database
GPG Key ID: 712D413B3A9FED5C
1 changed files with 1 additions and 1 deletions

View File

@ -16,7 +16,7 @@ export class NoteFile1710304584214 implements MigrationInterface {
SELECT "t"."id", "t"."fid" FROM (
SELECT ROW_NUMBER() OVER () AS "rn", * FROM (
SELECT "id", UNNEST("fileIds") AS "fid" FROM "note"
)
) AS "s"
) AS "t"
INNER JOIN "drive_file" ON "drive_file"."id" = "t"."fid"
ORDER BY "rn"