Examples
Import Cloudflare D1
Import your Cloudflare D1 database schema into ChartDB
Download Import Script
Download our Cloudflare D1 import script:
Usage
Run the script with your Cloudflare D1 database name and ChartDB information:
For remote databases, add the -r
flag:
Required Parameters
-d
Cloudflare D1 database name-a
ChartDB API key-t
Target diagram ID
Optional Parameters
-r
Use remote database (if not specified, uses local database)
The script will connect to your Cloudflare D1 database, extract the schema, and automatically import it into your ChartDB diagram.
Automated Daily Updates
To automatically update your diagram daily using cron, add the following line to your crontab:
To edit your crontab:
Note: Replace /path/to/cloudflare-d1-import.sh
with the absolute path to
the script and adjust the database name accordingly. The log file path
(/path/to/d1-import.log
) should be in a directory where your user has write
permissions.
Was this page helpful?