Separate staged command payloads from provisioning state

This commit is contained in:
2026-10-06 14:03:28 -04:00
parent ddb3db9537
commit fbf0629486
4 changed files with 54 additions and 13 deletions
+8
View File
@@ -43,6 +43,14 @@ export function migrateNativeInstances(handle: Database.Database): void {
);
CREATE INDEX IF NOT EXISTS idx_ec_host_migrations_instance ON ec_host_migrations(instance_id);
`);
if (!handle.prepare("SELECT 1 FROM settings WHERE key='native_file_plans_v1'").get()) {
handle.transaction(() => {
handle.exec(`UPDATE native_provisioning SET files_json=(SELECT json_group_array(json_remove(value,'$.contentBase64'))
FROM json_each(native_provisioning.files_json)) WHERE files_json IS NOT NULL;
INSERT INTO settings(key,value) VALUES('native_file_plans_v1','1');`);
})();
}
}
/** Accepted native creations receive their host port only when provisioning places them. */