Merge pull request #2 from ltlapy/bugfix/smtp_charlen_limit

Increase character limit for smtpHost, smtpUser, smtpPass
This commit is contained in:
Ryu jongheon 2022-06-07 19:06:23 +09:00 committed by GitHub
commit 995be6534f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 3 deletions

View file

@ -0,0 +1,15 @@
export class increaseSmtpCharLimit1654589815249 {
name = 'increaseSmtpCharLimit1654589815249'
async up(queryRunner) {
await queryRunner.query(`ALTER TABLE "meta" ALTER COLUMN "smtpHost" TYPE character varying(256)`);
await queryRunner.query(`ALTER TABLE "meta" ALTER COLUMN "smtpUser" TYPE character varying(256)`);
await queryRunner.query(`ALTER TABLE "meta" ALTER COLUMN "smtpPass" TYPE character varying(256)`);
}
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)`);
}
}

View file

@ -223,7 +223,7 @@ export class Meta {
public smtpSecure: boolean;
@Column('varchar', {
length: 128,
length: 256,
nullable: true,
})
public smtpHost: string | null;
@ -234,13 +234,13 @@ export class Meta {
public smtpPort: number | null;
@Column('varchar', {
length: 128,
length: 256,
nullable: true,
})
public smtpUser: string | null;
@Column('varchar', {
length: 128,
length: 256,
nullable: true,
})
public smtpPass: string | null;