Skip to content

Commit

Permalink
fix(core): Add missing primary key on the execution_data table on p…
Browse files Browse the repository at this point in the history
…ostgres (#6797)
  • Loading branch information
netroy authored and OlegIvaniv committed Aug 3, 2023
1 parent df32517 commit a9a2c9e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import type { IrreversibleMigration, MigrationContext } from '@/databases/types';

export class AddMissingPrimaryKeyOnExecutionData1690787606731 implements IrreversibleMigration {
async up({ queryRunner, tablePrefix }: MigrationContext) {
await queryRunner.query(
`ALTER TABLE "${tablePrefix}execution_data" ADD PRIMARY KEY("executionId");`,
);
}
}
2 changes: 2 additions & 0 deletions packages/cli/src/databases/migrations/postgresdb/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import { MigrateIntegerKeysToString1690000000000 } from './1690000000000-Migrate
import { SeparateExecutionData1690000000020 } from './1690000000020-SeparateExecutionData';
import { RemoveSkipOwnerSetup1681134145997 } from './1681134145997-RemoveSkipOwnerSetup';
import { RemoveResetPasswordColumns1690000000030 } from '../common/1690000000030-RemoveResetPasswordColumns';
import { AddMissingPrimaryKeyOnExecutionData1690787606731 } from './1690787606731-AddMissingPrimaryKeyOnExecutionData';

export const postgresMigrations: Migration[] = [
InitialMigration1587669153312,
Expand Down Expand Up @@ -83,4 +84,5 @@ export const postgresMigrations: Migration[] = [
SeparateExecutionData1690000000020,
RemoveSkipOwnerSetup1681134145997,
RemoveResetPasswordColumns1690000000030,
AddMissingPrimaryKeyOnExecutionData1690787606731,
];

0 comments on commit a9a2c9e

Please sign in to comment.