mirror of
https://github.com/gitpod-io/gitpod.git
synced 2025-12-08 17:36:30 +00:00
Revert "Create an index for contextURL column"
This reverts commit e0f7bfe976924005a4591ed9d3eb9e919111336a.
This commit is contained in:
parent
7c8c846b9d
commit
bcf031498e
@ -27,7 +27,6 @@ export class DBWorkspace implements Workspace {
|
||||
ownerId: string;
|
||||
|
||||
@Column("text")
|
||||
@Index('ind_contextURL')
|
||||
contextURL: string;
|
||||
|
||||
@Column({
|
||||
|
||||
@ -1,25 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) 2022 Gitpod GmbH. All rights reserved.
|
||||
* Licensed under the GNU Affero General Public License (AGPL).
|
||||
* See License-AGPL.txt in the project root for license information.
|
||||
*/
|
||||
|
||||
import {MigrationInterface, QueryRunner} from "typeorm";
|
||||
import { indexExists } from "./helper/helper";
|
||||
|
||||
export class IndexWorkspaceContextUrl1644327547997 implements MigrationInterface {
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
const TABLE_NAME = "d_b_workspace";
|
||||
const INDEX_NAME = "ind_contextURL";
|
||||
|
||||
if(!(await indexExists(queryRunner, TABLE_NAME, INDEX_NAME))) {
|
||||
await queryRunner.query("ALTER TABLE d_b_workspace MODIFY COLUMN `contextURL` varchar(255) NOT NULL");
|
||||
await queryRunner.query(`CREATE INDEX ${INDEX_NAME} ON ${TABLE_NAME} (contextURL)`);
|
||||
}
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user