Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
39 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} | ||
``` |