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

View file

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