typeorm 0.3.11-dev.cdabaa3 → 0.3.11-dev.efb4168

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.
package/README.md CHANGED
@@ -1289,7 +1289,7 @@ There are a few repositories which you can clone and start with:
1289
1289
 
1290
1290
  There are several extensions that simplify working with TypeORM and integrating it with other modules:
1291
1291
 
1292
- - [TypeORM + GraphQL framework](http://vesper-framework.com)
1292
+ - [TypeORM + GraphQL framework](https://github.com/vesper-framework/vesper)
1293
1293
  - [TypeORM integration](https://github.com/typeorm/typeorm-typedi-extensions) with [TypeDI](https://github.com/pleerock/typedi)
1294
1294
  - [TypeORM integration](https://github.com/typeorm/typeorm-routing-controllers-extensions) with [routing-controllers](https://github.com/pleerock/routing-controllers)
1295
1295
  - Models generation from existing database - [typeorm-model-generator](https://github.com/Kononnable/typeorm-model-generator)
@@ -1298,6 +1298,8 @@ There are several extensions that simplify working with TypeORM and integrating
1298
1298
  - another ER Diagram generator - [erdia](https://www.npmjs.com/package/erdia/)
1299
1299
  - Create, drop & seed database - [typeorm-extension](https://github.com/tada5hi/typeorm-extension)
1300
1300
  - Automatically update `data-source.ts` after generating migrations/entities - [typeorm-codebase-sync](https://www.npmjs.com/package/typeorm-codebase-sync)
1301
+ - Easy manipulation of `relations` objects - [typeorm-relations](https://npmjs.com/package/typeorm-relations)
1302
+ - Automatically generate `relations` based on a GraphQL query - [typeorm-relations-graphql](https://npmjs.com/package/typeorm-relations-graphql)
1301
1303
 
1302
1304
  ## Contributing
1303
1305
 
@@ -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);