1
0
Fork 1
mirror of https://example.com synced 2024-11-22 07:46:41 +09:00

fix (backend): add alias to a migration subquery

This commit is contained in:
naskya 2024-03-31 09:08:36 +09:00
parent bd859b814f
commit 7841c7df57
Signed by: naskya
GPG key ID: 712D413B3A9FED5C

View file

@ -10,7 +10,7 @@ export class NoteFile1710304584214 implements MigrationInterface {
await queryRunner.query(` await queryRunner.query(`
INSERT INTO "note_file" ("noteId", "fileId") SELECT * FROM ( INSERT INTO "note_file" ("noteId", "fileId") SELECT * FROM (
SELECT "id", UNNEST("fileIds") FROM "note" SELECT "id", UNNEST("fileIds") FROM "note"
) ) as "s"
`); `);
await queryRunner.createIndices("note_file", [ await queryRunner.createIndices("note_file", [
{ {