pscale-import-d1
Installation
SKILL.md
pscale import d1
Import a Cloudflare D1 database export into PlanetScale Postgres using pscale import d1.
Capabilities
The pscale import d1 command group supports offline Cloudflare D1 migrations. It lints a D1 SQL export, converts SQLite DDL to PostgreSQL DDL, loads data into a PlanetScale Postgres branch, stores local migration state, and verifies the import.
All commands support --format json through the global pscale flag; use JSON for agent automation.
Prerequisites
# Export D1 using Wrangler first
wrangler d1 export <d1-database-name> --remote --output ./d1-export.sql
# Verify local import prerequisites such as pgloader
pscale import d1 doctor --format json