Skip to content

armgit / fuobe

Public Imported from GitHub
0

The open creative studio on ComfyUI: images, video, 3D and audio on open weights, on your own GPU or the cloud. Camera motions, effects, apps, Cinema, Layers, Image to 3D and an AI agent.

Database: the note on older branch data sits above the code it describes again

Claudeb14fa5f0d8b0
diff --git a/src/server/db.ts b/src/server/db.ts
index 10f2a2f3..8f349626 100644
--- a/src/server/db.ts
+++ b/src/server/db.ts
@@ -970,6 +970,13 @@ declare global {
var __fuobeAuthTablesError: string | null | undefined;
}
+/** Whether skill_runs is the earlier build's table (no engine column), and no table holds the earlier runs yet. */
+function skillRunsFromEarlierBuild(db: Database.Database): boolean {
+ const columns = (db.prepare("PRAGMA table_info(skill_runs)").all() as { name: string }[]).map((c) => c.name);
+ if (!columns.length || columns.includes("engine")) return false;
+ return !db.prepare("SELECT 1 FROM sqlite_master WHERE type = 'table' AND name = 'skill_runs_earlier'").get();
+}
+
/**
* A data folder that ran PR #15's branch before the owner dropped the old accounts packages on 10-30
* (`claude/fuobe-parity-4` up to f7c6d8e, `claude/fuobe-r5-batch-7` up to c9cd489) has places 23 and 24 marked done for
@@ -978,13 +985,6 @@ declare global {
* forgotten when this list's work is missing and the dropped package's is there, so the loop below runs it. The dropped
* tables stay: nothing reads them, and nothing anyone made is deleted.
*/
-/** Whether skill_runs is the earlier build's table (no engine column), and no table holds the earlier runs yet. */
-function skillRunsFromEarlierBuild(db: Database.Database): boolean {
- const columns = (db.prepare("PRAGMA table_info(skill_runs)").all() as { name: string }[]).map((c) => c.name);
- if (!columns.length || columns.includes("engine")) return false;
- return !db.prepare("SELECT 1 FROM sqlite_master WHERE type = 'table' AND name = 'skill_runs_earlier'").get();
-}
-
function forgetDroppedBranchMigrations(db: Database.Database): void {
const done = (id: number) => !!db.prepare("SELECT 1 FROM _migrations WHERE id = ?").get(id);
const has = (type: "table" | "trigger", name: string) => !!db.prepare("SELECT 1 FROM sqlite_master WHERE type = ? AND name = ?").get(type, name);