PostgreSQL 12 compatibility (lack of consrc)
See original GitHub issueIssue type: [x] bug report [x] feature request
Database system/driver:
[x] postgres
TypeORM version:
[x] latest
[x] @next
Steps to reproduce or a small repository showing the problem:
PostgreSQL 12 removes the pg_constraint.consrc
column. This makes constraintsSql
from loadTables
in PostgresQueryRunner.ts fail with an exception and aborting the transaction. Documentation:
The docs for 11 still include consrc
, but recommend to use pg_get_constraintdef
, which only seems to be used for exclusions constraints (x
) here. This has been introduced in #2710 for exclusions constraints. It seems that expression
is used in some places, but giving it a very rough look I think whatever pg_get_constraintdef
returns might work as well. Always using pg_get_constraintdef
at least gets my 1 entity test running, but this obviously does not use many constraints.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:25
- Comments:20
@Kononnable I see that it’s fixed in the fork of typeorm. Will it be fixed also in the main typeorm (this) repo some day?
It works in
0.2.21
! Thanks!