feat: automate business upgrades and sync reviewed frontend
This commit is contained in:
@@ -168,14 +168,10 @@ func (d *Data) reloadConfig(ctx context.Context) error {
|
||||
return fmt.Errorf("reload database: %w", err)
|
||||
}
|
||||
}
|
||||
if databaseReady && (next.Admin.System == nil || !next.Admin.System.DisableAutoMigrate) {
|
||||
if err = migrateAll(candidateDB.WithContext(ctx), d.catalog); err != nil {
|
||||
return fmt.Errorf("reload database migrations: %w", err)
|
||||
}
|
||||
}
|
||||
if databaseReady && next.Admin.System != nil && next.Admin.System.DisableAutoMigrate {
|
||||
if err = checkMigratedSchema(candidateDB.WithContext(ctx), d.catalog); err != nil {
|
||||
return fmt.Errorf("reload database schema: %w", err)
|
||||
if databaseReady {
|
||||
disable := next.Admin.System != nil && next.Admin.System.DisableAutoMigrate
|
||||
if err = prepareConfiguredDatabase(ctx, candidateDB, next.Data.Database, d.catalog, d.logger(), configPath, disable); err != nil {
|
||||
return fmt.Errorf("reload database upgrade: %w", err)
|
||||
}
|
||||
}
|
||||
storageConfig, err := dataintegration.ResolveStorageConfig(candidateDB.WithContext(ctx), next.Admin.Storage)
|
||||
|
||||
Reference in New Issue
Block a user