-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Prevent the open handle on the tests due to the db connection and makes failure on db migrations "fail fast". - Introduce `AbortController` to clients to abort polling requests when agents shut down.
- Loading branch information
Showing
16 changed files
with
667 additions
and
153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// separating this and importing it allows | ||
// tsx to run this before the rest of the app | ||
// for dev purposes | ||
|
||
require("dotenv").config(); |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import "./env"; | ||
import { migrate } from "drizzle-orm/node-postgres/migrator"; | ||
import * as data from "../modules/data"; | ||
|
||
(async function runMigrations() { | ||
console.log("Migrating database..."); | ||
|
||
try { | ||
await migrate(data.db, { migrationsFolder: "./drizzle" }); | ||
console.log("Database migrated successfully"); | ||
} catch (e) { | ||
console.error("Error migrating database", e); | ||
process.exit(1); | ||
} | ||
|
||
await data.pool.end(); | ||
})(); |
Oops, something went wrong.