diff --git a/packages/backend/src/migration/1697286869039-increase-oauth-token-redirecturis-length.ts b/packages/backend/src/migration/1697286869039-increase-oauth-token-redirecturis-length.ts new file mode 100644 index 000000000..e6fe1e7df --- /dev/null +++ b/packages/backend/src/migration/1697286869039-increase-oauth-token-redirecturis-length.ts @@ -0,0 +1,14 @@ +import { MigrationInterface, QueryRunner } from "typeorm"; + +export class IncreaseOauthTokenRedirecturisLength1697286869039 implements MigrationInterface { + name = 'IncreaseOauthTokenRedirecturisLength1697286869039' + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE "oauth_token" ALTER "redirectUri" TYPE character varying(512)`); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE "oauth_token" ALTER "redirectUri" TYPE character varying(64)`); + } + +} diff --git a/packages/backend/src/models/entities/oauth-token.ts b/packages/backend/src/models/entities/oauth-token.ts index 17d09c800..4e7bd3982 100644 --- a/packages/backend/src/models/entities/oauth-token.ts +++ b/packages/backend/src/models/entities/oauth-token.ts @@ -58,7 +58,7 @@ export class OAuthToken { public scopes: string[]; @Column("varchar", { - length: 64, + length: 512, comment: "The redirect URI of the OAuth token", }) public redirectUri: string;