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

Function tidbMoveToOtherDatabase

backend/plugin/schema/tidb/walk_through.go:204–209  ·  view source on GitHub ↗
(d *model.DatabaseMetadata, node *tidbast.TableToTable)

Source from the content-addressed store, hash-verified

202}
203
204func tidbMoveToOtherDatabase(d *model.DatabaseMetadata, node *tidbast.TableToTable) bool {
205 if node.OldTable.Schema.O != "" && !isCurrentDatabase(d, node.OldTable.Schema.O) {
206 return false
207 }
208 return node.OldTable.Schema.O != node.NewTable.Schema.O
209}
210
211func tidbTheCurrentDatabase(d *model.DatabaseMetadata, node *tidbast.TableToTable) bool {
212 if node.NewTable.Schema.O != "" && !isCurrentDatabase(d, node.NewTable.Schema.O) {

Callers 1

tidbRenameTableFunction · 0.85

Calls 1

isCurrentDatabaseFunction · 0.70

Tested by

no test coverage detected