Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: skip getting ddl when schema is empty (#6217)

Danny Xu6f794e20331d
diff --git a/backend/plugin/db/oracle/dump.go b/backend/plugin/db/oracle/dump.go
index 9c8d7c64a0..1d115693ba 100644
--- a/backend/plugin/db/oracle/dump.go
+++ b/backend/plugin/db/oracle/dump.go
@@ -23,6 +23,10 @@ func (driver *Driver) Dump(ctx context.Context, out io.Writer, _ bool) (string,
return "", err
}
+ if len(schemas) == 0 {
+ return "", nil
+ }
+
var quotedSchemas []string
for _, schema := range schemas {
quotedSchemas = append(quotedSchemas, fmt.Sprintf("'%s'", schema))