add statistics

This commit is contained in:
miloschwartz
2025-08-14 17:06:07 -07:00
parent 74d2527af5
commit 67ba225003
11 changed files with 362 additions and 11 deletions

View File

@@ -18,7 +18,7 @@ const migrations = [
{ version: "1.6.0", run: m1 },
{ version: "1.7.0", run: m2 },
{ version: "1.8.0", run: m3 },
{ version: "1.9.0", run: m4 }
// { version: "1.9.0", run: m4 }
// Add new migrations here as they are created
] as {
version: string;

View File

@@ -50,7 +50,7 @@ const migrations = [
{ version: "1.6.0", run: m21 },
{ version: "1.7.0", run: m22 },
{ version: "1.8.0", run: m23 },
{ version: "1.9.0", run: m24 },
// { version: "1.9.0", run: m24 },
// Add new migrations here as they are created
] as const;

View File

@@ -1,17 +0,0 @@
import { db } from "@server/db";
import { hostMeta } from "@server/db";
import { v4 as uuidv4 } from "uuid";
export async function setHostMeta() {
const [existing] = await db.select().from(hostMeta).limit(1);
if (existing && existing.hostMetaId) {
return;
}
const id = uuidv4();
await db
.insert(hostMeta)
.values({ hostMetaId: id, createdAt: new Date().getTime() });
}