jenkins
This commit is contained in:
@@ -137,6 +137,14 @@ func (d *Data) InitializeDatabase(ctx context.Context, input *system.DatabaseCon
|
||||
}
|
||||
}
|
||||
}()
|
||||
releaseLock, err := acquireInitializationLock(ctx, candidate, database)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer releaseLock()
|
||||
if persistedDatabaseConfigured(d.runtime) {
|
||||
return errors.New("数据库已初始化,无需重复初始化")
|
||||
}
|
||||
db := candidate.WithContext(ctx)
|
||||
if err := migrateAll(db, d.catalog); err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user