mirror of
https://github.com/gitpod-io/gitpod.git
synced 2025-12-08 17:36:30 +00:00
28 lines
841 B
TypeScript
28 lines
841 B
TypeScript
/**
|
|
* Copyright (c) 2021 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 { TypeORM } from "./typeorm/typeorm";
|
|
import { Config } from "./config";
|
|
import { MigrateMigrations0_2_0 } from "./typeorm/migrate-migrations-0_2_0";
|
|
|
|
async function migrateMigrationsTable() {
|
|
const config = new Config();
|
|
const typeorm = new TypeORM(config, {});
|
|
const conn = await typeorm.getConnection();
|
|
|
|
const runner = conn.createQueryRunner();
|
|
const migration_0_2_0 = new MigrateMigrations0_2_0();
|
|
await migration_0_2_0.up(runner);
|
|
|
|
conn.close();
|
|
console.log("successfully migrated 'migrations' table.");
|
|
}
|
|
|
|
migrateMigrationsTable().catch((err) => {
|
|
console.error(err);
|
|
process.exit(1);
|
|
});
|