From 6b0ecc4ec65912fab58c5bbf7fe78ba236478519 Mon Sep 17 00:00:00 2001 From: Hafez Divandari Date: Wed, 13 Dec 2023 12:06:53 +0330 Subject: [PATCH 1/2] exclude extension types --- src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php b/src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php index 4d5fb7ba1312..0f1429b322c5 100755 --- a/src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php +++ b/src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php @@ -115,6 +115,7 @@ public function compileTypes() .'left join pg_type el on el.oid = t.typelem ' .'left join pg_class ce on ce.oid = el.typrelid ' ."where ((t.typrelid = 0 and (ce.relkind = 'c' or ce.relkind is null)) or c.relkind = 'c') " + ."and not exists (select 1 from pg_depend d where d.objid = t.oid and d.deptype = 'e') " ."and n.nspname not in ('pg_catalog', 'information_schema')"; } From 5fa2f1a1b1edcddc488ebc20ce06afbfb2cd7598 Mon Sep 17 00:00:00 2001 From: Hafez Divandari Date: Wed, 13 Dec 2023 12:46:02 +0330 Subject: [PATCH 2/2] also exclude implicit extension types --- src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php b/src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php index 0f1429b322c5..688d4acfac1f 100755 --- a/src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php +++ b/src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php @@ -115,7 +115,7 @@ public function compileTypes() .'left join pg_type el on el.oid = t.typelem ' .'left join pg_class ce on ce.oid = el.typrelid ' ."where ((t.typrelid = 0 and (ce.relkind = 'c' or ce.relkind is null)) or c.relkind = 'c') " - ."and not exists (select 1 from pg_depend d where d.objid = t.oid and d.deptype = 'e') " + ."and not exists (select 1 from pg_depend d where d.objid in (t.oid, t.typelem) and d.deptype = 'e') " ."and n.nspname not in ('pg_catalog', 'information_schema')"; }