mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
fix: Correct migration ordering so KubernetesCluster table is created before ALTER
TypeORM sorts migrations by the timestamp in the last 13 chars of the class name. Migration 1773761409952 (ALTER TABLE) had a lower timestamp than 1774000000000 (CREATE TABLE), causing it to run first on a non-existent table and crash the app during startup. Renamed 1773761409952 → 1774000000001 so the CREATE TABLE migration executes first.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class MigrationName1773761409952 implements MigrationInterface {
|
||||
public name = "MigrationName1773761409952";
|
||||
export class MigrationName1774000000001 implements MigrationInterface {
|
||||
public name = "MigrationName1774000000001";
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(
|
||||
@@ -267,7 +267,7 @@ import { MigrationName1773344537755 } from "./1773344537755-MigrationName";
|
||||
import { MigrationName1773402621107 } from "./1773402621107-MigrationName";
|
||||
import { MigrationName1773676206197 } from "./1773676206197-MigrationName";
|
||||
import { MigrationName1774000000000 } from "./1774000000000-MigrationName";
|
||||
import { MigrationName1773761409952 } from "./1773761409952-MigrationName";
|
||||
import { MigrationName1774000000001 } from "./1774000000001-MigrationName";
|
||||
|
||||
export default [
|
||||
InitialMigration,
|
||||
@@ -539,5 +539,5 @@ export default [
|
||||
MigrationName1773402621107,
|
||||
MigrationName1773676206197,
|
||||
MigrationName1774000000000,
|
||||
MigrationName1773761409952,
|
||||
MigrationName1774000000001,
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user