fix(postgres): handle PostgreSQL views

This commit is contained in:
ptma authored and GitHub committed 2026-06-25 10:54:38 +08:00
1 parent 2999d9c56f
commit 484d20922a
7 files changed
+19 -16

No files matched your search

@@ -269,10 +269,10 @@ function handleOptionsUpdate(options: SchemaDiffCompareOptions) {
* Views and materialized views need the object_type parameter so the
* backend can call DBMS_METADATA.GET_DDL with the correct type. */
function isViewOrMaterializedView(tableType: string): ObjectSourceKind | undefined {
switch (tableType.toUpperCase()) {
switch (tableType.toUpperCase().replace(/\s+/g, "_")) {
case "VIEW":
return "VIEW";
case "MATERIALIZED VIEW":
case "MATERIALIZED_VIEW":
return "MATERIALIZED_VIEW";
default:
return undefined;