forked from gitpod-io/gitpod
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[db] Improve performance of DBUserStorageResource.update(...) (gitpod…
…-io#3151) * [db] UserStorageResource: make userId char(36) instead of varchar(255) * [db] Use INSERT INTO ... ON DUPLICATE KEY UPDATE for user storage
- Loading branch information
Showing
2 changed files
with
21 additions
and
13 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
components/gitpod-db/src/typeorm/migration/1612781029090-UserStorageUserIdChar36.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,12 @@ | ||
import {MigrationInterface, QueryRunner} from "typeorm"; | ||
|
||
export class UserStorageUserIdChar1612781029090 implements MigrationInterface { | ||
|
||
public async up(queryRunner: QueryRunner): Promise<any> { | ||
await queryRunner.query("ALTER TABLE d_b_user_storage_resource MODIFY userId char(36);"); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<any> { | ||
} | ||
|
||
} |
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