Fix SmtpCharLimit migration on downgrade may fail

smtpHost/smtpUser/smtpPass 가 128보다 긴 상황에서 다운그레이드할 때, 마이그레이션이 실패하거나 설정이 깨질 위험이 있기 때문에 아예 터치하지 않는 걸로
This commit is contained in:
Ryu jongheon 2022-06-08 09:12:22 +09:00 committed by GitHub
parent 0a7a0ec8d4
commit 1b3fb2ae55
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,8 +8,10 @@ export class increaseSmtpCharLimit1654589815249 {
}
async down(queryRunner) {
await queryRunner.query(`ALTER TABLE "meta" ALTER COLUMN "smtpHost" TYPE character varying(128)`);
await queryRunner.query(`ALTER TABLE "meta" ALTER COLUMN "smtpUser" TYPE character varying(128)`);
await queryRunner.query(`ALTER TABLE "meta" ALTER COLUMN "smtpPass" TYPE character varying(128)`);
// It's safe to keep extended character limit, rather than shrinking with risk of breaking settings
// await queryRunner.query(`ALTER TABLE "meta" ALTER COLUMN "smtpHost" TYPE character varying(128)`);
// await queryRunner.query(`ALTER TABLE "meta" ALTER COLUMN "smtpUser" TYPE character varying(128)`);
// await queryRunner.query(`ALTER TABLE "meta" ALTER COLUMN "smtpPass" TYPE character varying(128)`);
}
}