mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 02:11:53 +00:00
feat: improve service version migration and data version handling
Extract get_data_version into a shared function used by both effects and service_map. Use the actual data version (instead of the previous package version) when computing migration targets, and skip migrations when the target range is unsatisfiable. Also detect install vs update based on the presence of a data version file rather than load disposition alone.
This commit is contained in:
@@ -331,6 +331,9 @@ export class VersionGraph<CurrentVersion extends string>
|
||||
target: VersionRange | ExtendedVersion | null,
|
||||
): Promise<void> {
|
||||
if (target) {
|
||||
if (isRange(target) && !target.satisfiable()) {
|
||||
return
|
||||
}
|
||||
const from = await getDataVersion(effects)
|
||||
if (from) {
|
||||
target = await this.migrate({
|
||||
|
||||
Reference in New Issue
Block a user