feat: support per-user credentials on shared hosts

This commit is contained in:
ZacharyZcR
2026-05-13 17:26:24 +08:00
parent ec87f8a4d1
commit 5c9d8bfa34
4 changed files with 117 additions and 1 deletions
+13
View File
@@ -1007,6 +1007,19 @@ const migrateSchema = () => {
}
}
try {
sqlite.prepare("SELECT override_credential_id FROM host_access LIMIT 1").get();
} catch {
try {
sqlite.exec("ALTER TABLE host_access ADD COLUMN override_credential_id INTEGER REFERENCES ssh_credentials(id) ON DELETE SET NULL");
} catch (alterError) {
databaseLogger.warn("Failed to add override_credential_id column", {
operation: "schema_migration",
error: alterError,
});
}
}
try {
sqlite.prepare("SELECT sudo_password FROM ssh_data LIMIT 1").get();
} catch {