Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: delete unused (#12672)
Danny Xu368f12434740
diff --git a/backend/plugin/db/util/restore.go b/backend/plugin/db/util/restore.godeleted file mode 100644index b3ac6c4079..0000000000--- a/backend/plugin/db/util/restore.go+++ /dev/null@@ -1,34 +0,0 @@-package util--import "fmt"--const (- // MaxDatabaseNameLength is the allowed max database name length in MySQL.- MaxDatabaseNameLength = 64-)--// TODO(dragonly): Check for PostgreSQL.--// GetPITRDatabaseName composes a pitr database name that we use as the target database for full backup recovery and binlog recovery.-// For example, GetPITRDatabaseName("dbfoo", 1653018005) -> "dbfoo_pitr_1653018005".-func GetPITRDatabaseName(database string, suffixTs int64) string {- suffix := fmt.Sprintf("pitr_%d", suffixTs)- return GetSafeName(database, suffix)-}--// GetPITROldDatabaseName composes a database name that we use as the target database for swapping out the original database.-// For example, GetPITROldDatabaseName("dbfoo", 1653018005) -> "dbfoo_pitr_1653018005_del".-func GetPITROldDatabaseName(database string, suffixTs int64) string {- suffix := fmt.Sprintf("pitr_%d_del", suffixTs)- return GetSafeName(database, suffix)-}--// GetSafeName trims the name according to max allowed database name length.-func GetSafeName(baseName, suffix string) string {- name := fmt.Sprintf("%s_%s", baseName, suffix)- if len(name) <= MaxDatabaseNameLength {- return name- }- extraCharacters := len(name) - MaxDatabaseNameLength- return fmt.Sprintf("%s_%s", baseName[0:len(baseName)-extraCharacters], suffix)-}