Skip to content

Commit

Permalink
Clarify that wrangler d1 execute defaults to remote DB
Browse files Browse the repository at this point in the history
  • Loading branch information
joshthoward committed Oct 17, 2023
1 parent 36d4978 commit 8cd2465
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/wrangler/src/d1/execute.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ async function executeLocally({
const persistencePath = getLocalPersistencePath(persistTo, config.configPath);
const d1Persist = path.join(persistencePath, "v3", "d1");

logger.log(`🌀 Loading ${id} from ${readableRelative(d1Persist)}`);
logger.log(`🌀 Executing on local database ${name} (${id}) from ${readableRelative(d1Persist)}:`);

const mf = new Miniflare({
modules: true,
Expand Down Expand Up @@ -313,7 +313,8 @@ async function executeRemotely({
);
}
const dbUuid = preview ? db.previewDatabaseUuid : db.uuid;
logger.log(`🌀 Executing on ${name} (${dbUuid}):`);
logger.log(`🌀 Executing on remote database ${name} (${dbUuid}):`);
logger.log("🌀 To execute on your local development database, pass the --local flag to 'wrangler d1 execute'");

const results: QueryResult[] = [];
for (const sql of batches) {
Expand Down

0 comments on commit 8cd2465

Please sign in to comment.