summaryrefslogtreecommitdiff
path: root/packages/db/src/runtime/db-client.ts
diff options
context:
space:
mode:
authorGravatar Ben Holmes <hey@bholmes.dev> 2024-03-07 13:38:43 -0500
committerGravatar GitHub <noreply@github.com> 2024-03-07 13:38:43 -0500
commit06fe94e29de97290cb41c4f862ab88f48cda3d4a (patch)
tree2081ae73b962114cca2fa0a4594d6147c6617ae1 /packages/db/src/runtime/db-client.ts
parent123f6f855129d2272f8619c685a848ee40fe9535 (diff)
downloadastro-06fe94e29de97290cb41c4f862ab88f48cda3d4a.tar.gz
astro-06fe94e29de97290cb41c4f862ab88f48cda3d4a.tar.zst
astro-06fe94e29de97290cb41c4f862ab88f48cda3d4a.zip
Add `--remote` flag for remote connection (#10352)
* feat: check for --remote * chore: remove bad ticketing example cols * fix: get seed file working with build * Revert "fix: get seed file working with build" This reverts commit 92830a106164b0997c820a3e0bf2a582018084a0. * fix: seed from build instead of runtime * refactor: move recreateTables out of runtime * Revert "refactor: move recreateTables out of runtime" This reverts commit d01a802ad7915fabc4c4ac35b2d907eae0538d95. * fix: in-memory db for test fixture * chore: changeset * refactor: generate random db name instead * refactor: use yargs-parser for flag * chore: remove in-memory db logi * refactor: rename random id flag for clarity * feat: support --remote in dev * feat: support --remote on shell * refactor: inline db client * feat: support --remote on db execute * chore: stray console log * chore: remove recreateTables from runtime * chore: update seeding for new signature * chore: remove unused error imports
Diffstat (limited to 'packages/db/src/runtime/db-client.ts')
-rw-r--r--packages/db/src/runtime/db-client.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/db/src/runtime/db-client.ts b/packages/db/src/runtime/db-client.ts
index a92f6714a..bd892a4dd 100644
--- a/packages/db/src/runtime/db-client.ts
+++ b/packages/db/src/runtime/db-client.ts
@@ -9,7 +9,7 @@ const isWebContainer = !!process.versions?.webcontainer;
export function createLocalDatabaseClient({ dbUrl }: { dbUrl: string }): LibSQLDatabase {
const url = isWebContainer ? 'file:content.db' : dbUrl;
- const client = createClient({ url: process.env.TEST_IN_MEMORY_DB ? ':memory:' : url });
+ const client = createClient({ url });
const db = drizzleLibsql(client);
return db;