typeorm 0.3.11-dev.2e1c9fd → 0.3.11-dev.38e0eff

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1448,6 +1448,9 @@ export class PostgresQueryRunner extends BaseQueryRunner {
1448
1448
  : table.foreignKeys.find((fk) => fk.name === foreignKeyOrName);
1449
1449
  if (!foreignKey)
1450
1450
  throw new TypeORMError(`Supplied foreign key was not found in table ${table.name}`);
1451
+ if (!foreignKey.name) {
1452
+ foreignKey.name = this.connection.namingStrategy.foreignKeyName(table, foreignKey.columnNames, this.getTablePath(foreignKey), foreignKey.referencedColumnNames);
1453
+ }
1451
1454
  const up = this.dropForeignKeySql(table, foreignKey);
1452
1455
  const down = this.createForeignKeySql(table, foreignKey);
1453
1456
  await this.executeQueries(up, down);