fix(core): Prevent multiple values in the execution metadata for the same key and executionId (#9953)
This commit is contained in:
@@ -13,6 +13,8 @@ export class Column {
|
||||
|
||||
private defaultValue: unknown;
|
||||
|
||||
private primaryKeyConstraintName: string | undefined;
|
||||
|
||||
constructor(private name: string) {}
|
||||
|
||||
get bool() {
|
||||
@@ -57,6 +59,12 @@ export class Column {
|
||||
return this;
|
||||
}
|
||||
|
||||
primaryWithName(name?: string) {
|
||||
this.isPrimary = true;
|
||||
this.primaryKeyConstraintName = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
get notNull() {
|
||||
this.isNullable = false;
|
||||
return this;
|
||||
@@ -74,12 +82,14 @@ export class Column {
|
||||
|
||||
// eslint-disable-next-line complexity
|
||||
toOptions(driver: Driver): TableColumnOptions {
|
||||
const { name, type, isNullable, isPrimary, isGenerated, length } = this;
|
||||
const { name, type, isNullable, isPrimary, isGenerated, length, primaryKeyConstraintName } =
|
||||
this;
|
||||
const isMysql = 'mysql' in driver;
|
||||
const isPostgres = 'postgres' in driver;
|
||||
const isSqlite = 'sqlite' in driver;
|
||||
|
||||
const options: TableColumnOptions = {
|
||||
primaryKeyConstraintName,
|
||||
name,
|
||||
isNullable,
|
||||
isPrimary,
|
||||
|
||||
Reference in New Issue
Block a user