mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-08 05:56:38 +00:00
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user