Actually run the migrations; update exit nodes

Fix #1718
Fix #1720
This commit is contained in:
Owen
2025-10-20 20:55:24 -07:00
parent 60379a7b4e
commit 4a59823e58
4 changed files with 19 additions and 4 deletions

View File

@@ -7,6 +7,8 @@ export default async function migration() {
console.log(`Running setup script ${version}...`);
try {
await db.execute(sql`BEGIN`);
// Get the first exit node with type 'gerbil'
const exitNodesQuery = await db.execute(
sql`SELECT "exitNodeId" FROM "exitNodes" WHERE "type" = 'gerbil' LIMIT 1`
@@ -32,6 +34,8 @@ export default async function migration() {
`);
}
await db.execute(sql`UPDATE "exitNodes" SET "online" = true`); // Mark exit nodes as online
await db.execute(sql`COMMIT`);
console.log(`Updated sites with exit node`);
} catch (e) {