Skip to content
This repository has been archived by the owner on Dec 2, 2023. It is now read-only.

Commit

Permalink
Merge pull request #2 from ltlapy/bugfix/smtp_charlen_limit
Browse files Browse the repository at this point in the history
Increase character limit for smtpHost, smtpUser, smtpPass
  • Loading branch information
ltlapy committed Jun 7, 2022
2 parents c22906f + 0a7a0ec commit 995be65
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -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)`);
}
}
6 changes: 3 additions & 3 deletions packages/backend/src/models/entities/meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ export class Meta {
public smtpSecure: boolean;

@Column('varchar', {
length: 128,
length: 256,
nullable: true,
})
public smtpHost: string | null;
Expand All @@ -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;
Expand Down

0 comments on commit 995be65

Please sign in to comment.