diff --git a/Common/Models/DatabaseModels/TelemetryException.ts b/Common/Models/DatabaseModels/TelemetryException.ts index b054be00e1..825bfecc98 100644 --- a/Common/Models/DatabaseModels/TelemetryException.ts +++ b/Common/Models/DatabaseModels/TelemetryException.ts @@ -221,14 +221,14 @@ export default class TelemetryException extends DatabaseBaseModel { }) @TableColumn({ required: false, - type: TableColumnType.LongText, + type: TableColumnType.VeryLongText, canReadOnRelationQuery: false, title: "Exception Message", description: "Exception message that was thrown by the telemetry service", }) @Column({ nullable: true, - type: ColumnType.LongText, + type: ColumnType.VeryLongText, }) public message?: string = undefined; @@ -252,7 +252,7 @@ export default class TelemetryException extends DatabaseBaseModel { }) @TableColumn({ required: false, - type: TableColumnType.LongText, + type: TableColumnType.VeryLongText, canReadOnRelationQuery: false, title: "Stack Trace", description: @@ -260,7 +260,7 @@ export default class TelemetryException extends DatabaseBaseModel { }) @Column({ nullable: true, - type: ColumnType.LongText, + type: ColumnType.VeryLongText, }) public stackTrace?: string = undefined; @@ -284,7 +284,7 @@ export default class TelemetryException extends DatabaseBaseModel { }) @TableColumn({ required: false, - type: TableColumnType.LongText, + type: TableColumnType.VeryLongText, canReadOnRelationQuery: false, title: "Exception Type", description: @@ -292,7 +292,7 @@ export default class TelemetryException extends DatabaseBaseModel { }) @Column({ nullable: true, - type: ColumnType.LongText, + type: ColumnType.VeryLongText, }) public exceptionType?: string = undefined; diff --git a/Common/Server/Infrastructure/Postgres/SchemaMigrations/1732553444010-MigrationName.ts b/Common/Server/Infrastructure/Postgres/SchemaMigrations/1732553444010-MigrationName.ts new file mode 100644 index 0000000000..b7c2ee0f64 --- /dev/null +++ b/Common/Server/Infrastructure/Postgres/SchemaMigrations/1732553444010-MigrationName.ts @@ -0,0 +1,30 @@ +import { MigrationInterface, QueryRunner } from "typeorm"; + +export class MigrationName1732553444010 implements MigrationInterface { + public name = "MigrationName1732553444010"; + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query( + `ALTER TABLE "TelemetryException" ALTER COLUMN "message" TYPE text`, + ); + await queryRunner.query( + `ALTER TABLE "TelemetryException" ALTER COLUMN "stackTrace" TYPE text`, + ); + await queryRunner.query( + `ALTER TABLE "TelemetryException" ALTER COLUMN "exceptionType" TYPE text`, + ); + } + + public async down(queryRunner: QueryRunner): Promise { + // revert changes made in up method - text to varchar + await queryRunner.query( + `ALTER TABLE "TelemetryException" ALTER COLUMN "message" TYPE varchar`, + ); + await queryRunner.query( + `ALTER TABLE "TelemetryException" ALTER COLUMN "stackTrace" TYPE varchar`, + ); + await queryRunner.query( + `ALTER TABLE "TelemetryException" ALTER COLUMN "exceptionType" TYPE varchar`, + ); + } +} diff --git a/Common/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts b/Common/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts index 251e639e15..d3468db4a9 100644 --- a/Common/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +++ b/Common/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts @@ -82,6 +82,7 @@ import { MigrationName1731433043136 } from "./1731433043136-MigrationName"; import { MigrationName1731433309124 } from "./1731433309124-MigrationName"; import { MigrationName1731435267537 } from "./1731435267537-MigrationName"; import { MigrationName1731435514287 } from "./1731435514287-MigrationName"; +import { MigrationName1732553444010 } from "./1732553444010-MigrationName"; export default [ InitialMigration, @@ -168,4 +169,5 @@ export default [ MigrationName1731433309124, MigrationName1731435267537, MigrationName1731435514287, + MigrationName1732553444010, ];