change migration so it sets uploadDate = createdAt

This commit is contained in:
Zamitto 2024-05-16 20:35:51 -03:00
parent be4d13533c
commit 4908d07ef2
2 changed files with 2 additions and 2 deletions

View File

@ -3,7 +3,7 @@ import { MigrationInterface, QueryRunner } from "typeorm";
export class FixRepackUploadDate1715900413313 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`UPDATE repack SET uploadDate = datetime('now') WHERE uploadDate LIKE '%NaN%';`
`UPDATE repack SET uploadDate = createdAt WHERE uploadDate LIKE '%NaN%';`
);
}

View File

@ -1,3 +1,3 @@
import { FixRepackUploadDate1715900413313 } from "./fix-repack-uploadDate/1715900413313-fix_repack_uploadDate";
import { FixRepackUploadDate1715900413313 } from "./1715900413313-fix_repack_uploadDate";
export default [FixRepackUploadDate1715900413313];