Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
从 KV 存储迁移到 D1 数据库
export CLOUDFLARE_ACCOUNT_ID="你的账户ID" export CLOUDFLARE_API_TOKEN="你的API Token" export BLOG_KV_ID="KV命名空间ID" export BLOG_D1_ID="D1数据库ID"
node scripts/migrate-kv-to-d1.mjs --dry-run
node scripts/migrate-kv-to-d1.mjs
migrate
posts
comments:{id}
comments
stats:{id}
stats
admin:auth
admin_auth
admin:sessions
admin_sessions
settings:*
site_settings
# 检查文章数量 npx wrangler d1 execute blog --remote --command "SELECT COUNT(*) FROM posts" # 检查评论数量 npx wrangler d1 execute blog --remote --command "SELECT COUNT(*) FROM comments"