From db47e234eec78d237c19ca7c267bea7486f97e20 Mon Sep 17 00:00:00 2001 From: Matthew Phillips Date: Wed, 27 Mar 2024 15:00:43 -0400 Subject: [PATCH] Update code --- packages/db/src/core/integration/index.ts | 2 +- packages/db/src/core/integration/vite-plugin-db.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/db/src/core/integration/index.ts b/packages/db/src/core/integration/index.ts index e58b823891f1..d288475a5d79 100644 --- a/packages/db/src/core/integration/index.ts +++ b/packages/db/src/core/integration/index.ts @@ -116,7 +116,7 @@ function astroDBIntegration(): AstroIntegration { }, 'astro:build:start': async ({ logger }) => { if(!connectToStudio && !databaseFileEnvDefined() && (output === 'server' || output === 'hybrid')) { - const message = `Attempting to build without the --remote flag or the DATABASE_FILE environment variable defined. You probably want to pass --remote to astro build.`; + const message = `Attempting to build without the --remote flag or the ASTRO_DATABASE_FILE environment variable defined. You probably want to pass --remote to astro build.`; const hint = 'Learn more connecting to Studio: https://docs.astro.build/en/guides/astro-db/#connect-to-astro-studio'; throw new AstroError(message, hint); } diff --git a/packages/db/src/core/integration/vite-plugin-db.ts b/packages/db/src/core/integration/vite-plugin-db.ts index 9b4b79e8d861..34685e958fd5 100644 --- a/packages/db/src/core/integration/vite-plugin-db.ts +++ b/packages/db/src/core/integration/vite-plugin-db.ts @@ -118,7 +118,7 @@ import { asDrizzleTable, createLocalDatabaseClient } from ${RUNTIME_IMPORT}; ${shouldSeed ? `import { seedLocal } from ${RUNTIME_IMPORT};` : ''} ${shouldSeed ? integrationSeedImportStatements.join('\n') : ''} -const dbUrl = import.meta.env.DATABASE_FILE ?? ${JSON.stringify(dbUrl)}; +const dbUrl = import.meta.env.ASTRO_DATABASE_FILE ?? ${JSON.stringify(dbUrl)}; export const db = createLocalDatabaseClient({ dbUrl });