MCPcopy Create free account
hub / github.com/bytebase/bytebase / DiffSDLMigration

Function DiffSDLMigration

backend/plugin/schema/schema.go:359–365  ·  view source on GitHub ↗

DiffSDLMigration computes migration SQL between two SDL texts.

(engine storepb.Engine, sourceSDL, targetSDL string)

Source from the content-addressed store, hash-verified

357
358// DiffSDLMigration computes migration SQL between two SDL texts.
359func DiffSDLMigration(engine storepb.Engine, sourceSDL, targetSDL string) (string, error) {
360 f, ok := diffSDLMigrations[engine]
361 if !ok {
362 return "", errors.Errorf("engine %s is not supported for SDL diff migration", engine)
363 }
364 return f(sourceSDL, targetSDL)
365}
366
367func RegisterGetMultiFileDatabaseDefinition(engine storepb.Engine, f getMultiFileDatabaseDefinition) {
368 mux.Lock()

Calls 2

fFunction · 0.85
ErrorfMethod · 0.80