mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-22 23:16:46 +00:00
feat(plugins): install an older version of a plugin (#2035)
Adds a version picker to the plugin admin panel, on desktop and mobile: every published version with its own server-computed compatibility verdict, so the client never re-derives semver range logic. A deliberate non-latest pick sets an update hold on the row, which keeps the update banner and "Update all" from immediately nagging the rollback away. The hold releases when an install lands back on the newest compatible version by any path, or when the admin resumes updates explicitly. An unresolvable registry never sets one: refusing to pin on missing information beats silently muting future updates.
This commit is contained in:
@@ -4123,6 +4123,19 @@ function runMigrations(db: Database.Database): void {
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// A deliberate non-latest plugin install sets `update_hold`: the row leaves the
|
||||
// update banner and "Update all" until the admin resumes updates, or until an
|
||||
// install lands back on the newest compatible version. Only an EXPLICIT version
|
||||
// pick ever sets it — dependency resolution pins versions too, but never
|
||||
// deliberately. Appended LAST — the array is index-addressed against schema_version.
|
||||
() => {
|
||||
try {
|
||||
db.exec('ALTER TABLE plugins ADD COLUMN update_hold INTEGER NOT NULL DEFAULT 0;');
|
||||
} catch (err) {
|
||||
console.warn('[migrations] Non-fatal migration step failed:', err);
|
||||
}
|
||||
},
|
||||
];
|
||||
|
||||
if (currentVersion < migrations.length) {
|
||||
|
||||
Reference in New Issue
Block a user