-
Notifications
You must be signed in to change notification settings - Fork 232
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update TelemetryException model to use VeryLongText type for message …
…fields and add migration for database schema changes
- Loading branch information
Showing
3 changed files
with
38 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
Common/Server/Infrastructure/Postgres/SchemaMigrations/1732553444010-MigrationName.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { MigrationInterface, QueryRunner } from "typeorm"; | ||
|
||
export class MigrationName1732553444010 implements MigrationInterface { | ||
public name = "MigrationName1732553444010"; | ||
|
||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
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<void> { | ||
// 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`, | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters