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

Method SyncDatabaseSchema

backend/runner/schemasync/syncer.go:473–476  ·  view source on GitHub ↗

SyncDatabaseSchema will sync the schema for a database.

(ctx context.Context, database *store.DatabaseMessage)

Source from the content-addressed store, hash-verified

471
472// SyncDatabaseSchema will sync the schema for a database.
473func (s *Syncer) SyncDatabaseSchema(ctx context.Context, database *store.DatabaseMessage) error {
474 _, err := s.doSyncDatabaseSchema(ctx, database, false)
475 return err
476}
477
478func (s *Syncer) databaseBackupAvailable(ctx context.Context, instance *store.InstanceMessage, dbMetadata *storepb.DatabaseSchemaMetadata) bool {
479 if !common.EngineSupportPriorBackup(instance.Metadata.GetEngine()) {

Callers 8

RunMethod · 0.95
RunOnceMethod · 0.80
queryRetryFunction · 0.80
SyncDatabaseMethod · 0.80
GetDatabaseMetadataMethod · 0.80
GetDatabaseSchemaMethod · 0.80
GetDatabaseSDLSchemaMethod · 0.80

Calls 1

doSyncDatabaseSchemaMethod · 0.95

Tested by 1