Skip to content

Commit

Permalink
Create swift-jars-guess.md (#3324)
Browse files Browse the repository at this point in the history
  • Loading branch information
rozenmd committed May 23, 2023
1 parent a262891 commit ed9fbf7
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .changeset/swift-jars-guess.md
@@ -0,0 +1,39 @@
---
"wrangler": patch
---

add `d1 info` command for people to check DB size

This PR adds a `d1 info <NAME>` command for getting information about a D1 database, including the current database size and state.

Usage:

```
> npx wrangler d1 info northwind
┌───────────────────┬──────────────────────────────────────┐
│ │ d5b1d127-xxxx-xxxx-xxxx-cbc69f0a9e06 │
├───────────────────┼──────────────────────────────────────┤
│ name │ northwind │
├───────────────────┼──────────────────────────────────────┤
│ version │ beta │
├───────────────────┼──────────────────────────────────────┤
│ num_tables │ 13 │
├───────────────────┼──────────────────────────────────────┤
│ file_size │ 33.1 MB │
├───────────────────┼──────────────────────────────────────┤
│ running_in_region │ WEUR │
└───────────────────┴──────────────────────────────────────┘
```

```
> npx wrangler d1 info northwind --json
{
"uuid": "d5b1d127-xxxx-xxxx-xxxx-cbc69f0a9e06",
"name": "northwind",
"version": "beta",
"num_tables": 13,
"file_size": 33067008,
"running_in_region": "WEUR"
}
```

0 comments on commit ed9fbf7

Please sign in to comment.