Skip to content

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

refactor(schema): remove unused MultiFileFormat from GetDefinitionContext (#20616)

h3n4l4af5a8269b7b
diff --git a/backend/api/v1/database_service.go b/backend/api/v1/database_service.go
index b046073393..257e65b3f5 100644
--- a/backend/api/v1/database_service.go
+++ b/backend/api/v1/database_service.go
@@ -1215,8 +1215,6 @@ func (*DatabaseService) getMultiFileSDL(engine storepb.Engine, metadata *storepb
// Get multi-file schema from schema package
result, err := schema.GetMultiFileDatabaseDefinition(engine, schema.GetDefinitionContext{
SkipBackupSchema: true,
- SDLFormat: true,
- MultiFileFormat: true,
}, metadata)
if err != nil {
return nil, connect.NewError(connect.CodeInternal, errors.Errorf("failed to generate multi-file SDL schema: %v", err))
diff --git a/backend/plugin/schema/pg/check_constraint_order_test.go b/backend/plugin/schema/pg/check_constraint_order_test.go
index 22d9b66106..b17eb56cd0 100644
--- a/backend/plugin/schema/pg/check_constraint_order_test.go
+++ b/backend/plugin/schema/pg/check_constraint_order_test.go
@@ -12,15 +12,6 @@ import (
// TestCheckConstraintOrderStability tests that CHECK constraints maintain consistent order
// when generating SDL multiple times from the same metadata
func TestCheckConstraintOrderStability(t *testing.T) {
- t.Run("single_file", func(t *testing.T) {
- testCheckConstraintOrder(t, false)
- })
- t.Run("multi_file", func(t *testing.T) {
- testCheckConstraintOrder(t, true)
- })
-}
-
-func testCheckConstraintOrder(t *testing.T, multiFile bool) {
// Simulate database metadata with multiple CHECK constraints
// (similar to the packages_debian_group_distributions table shown in the screenshot)
dbMetadata := &storepb.DatabaseSchemaMetadata{
@@ -64,7 +55,6 @@ func testCheckConstraintOrder(t *testing.T, multiFile bool) {
SkipBackupSchema: false,
PrintHeader: false,
SDLFormat: true,
- MultiFileFormat: multiFile,
}
// Generate SDL first time
diff --git a/backend/plugin/schema/schema.go b/backend/plugin/schema/schema.go
index f3ebab47e7..cc6d264d47 100644
--- a/backend/plugin/schema/schema.go
+++ b/backend/plugin/schema/schema.go
@@ -62,9 +62,6 @@ type GetDefinitionContext struct {
SkipBackupSchema bool
PrintHeader bool
SDLFormat bool
- // MultiFileFormat indicates whether to generate multi-file SDL output.
- // When true, the result should be organized as multiple files.
- MultiFileFormat bool
}
// File represents a single file in a multi-file schema output.
diff --git a/backend/utils/member_test.go b/backend/utils/member_test.go
index 9c71341ff1..1810b40c9c 100644
--- a/backend/utils/member_test.go
+++ b/backend/utils/member_test.go
@@ -1,3 +1,4 @@
+//nolint:revive
package utils
import (