From dbcd883cf9ed352acb9b4e4b615bf0da2b617271 Mon Sep 17 00:00:00 2001 From: kitloong Date: Tue, 31 Aug 2021 21:38:24 +0800 Subject: [PATCH] #44 Replace consrc with pg_get_constraintdef() --- .../MigrationsGenerator/Repositories/PgSQLRepository.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/KitLoong/MigrationsGenerator/Repositories/PgSQLRepository.php b/src/KitLoong/MigrationsGenerator/Repositories/PgSQLRepository.php index ff0d6e25..0a52bb02 100644 --- a/src/KitLoong/MigrationsGenerator/Repositories/PgSQLRepository.php +++ b/src/KitLoong/MigrationsGenerator/Repositories/PgSQLRepository.php @@ -49,7 +49,7 @@ public function getCheckConstraintDefinition(string $table, string $column): ?st ccu.table_schema AS table_schema, ccu.table_name, ccu.column_name, - pgc.consrc AS definition + pg_get_constraintdef(pgc.oid) AS definition FROM pg_constraint pgc JOIN pg_namespace nsp ON nsp.oid = pgc.connamespace JOIN pg_class cls ON pgc.conrelid = cls.oid