mirror of
https://github.com/netbirdio/netbird.git
synced 2026-09-30 18:49:08 +02:00
[management] Merge the two doc comments on dropDatabase
This commit is contained in:
@@ -1062,10 +1062,9 @@ func cloneMysqlSchema(ctx context.Context, dsn string, tableDDL []string) error
|
|||||||
}
|
}
|
||||||
|
|
||||||
// dropDatabase removes a template that never became usable, so a failed setup
|
// dropDatabase removes a template that never became usable, so a failed setup
|
||||||
// does not leave it behind on a shared server.
|
// does not leave it behind on a shared server. The server may still be tearing
|
||||||
// dropDatabase removes a template database that failed to migrate. The server
|
// down the sessions the failed migration held, so the drop retries while
|
||||||
// may still be tearing down the sessions the failed migration held, so the
|
// Postgres reports the database as in use.
|
||||||
// drop retries while Postgres reports the database as in use.
|
|
||||||
func dropDatabase(admin *gorm.DB, name string) {
|
func dropDatabase(admin *gorm.DB, name string) {
|
||||||
if err := execWithTemplateRetry(admin, fmt.Sprintf("DROP DATABASE IF EXISTS %s", name)); err != nil {
|
if err := execWithTemplateRetry(admin, fmt.Sprintf("DROP DATABASE IF EXISTS %s", name)); err != nil {
|
||||||
log.Warnf("failed to drop template database %s: %v", name, err)
|
log.Warnf("failed to drop template database %s: %v", name, err)
|
||||||
|
|||||||
Reference in New Issue
Block a user