mirror of
https://github.com/Elysola/WebHooker.git
synced 2026-11-20 17:13:49 +00:00
chore: add db:migrate scripts and document the D1 migration step
- Add npm scripts db:migrate (local) and db:migrate:prod (remote) for wrangler d1 migrations apply webhooker - Document the D1 database creation + migration step in the deployment guides (README en/zh, docs en/zh) and AGENTS.md - Note the d1 execute fallback for databases already migrated manually
This commit is contained in:
6 files changed
+89
-13
No files matched your search
+1
-3
@@ -278,9 +278,7 @@ npx wrangler kv namespace create KV
|
||||
# 创建 D1 数据库并执行迁移
|
||||
npx wrangler d1 create webhooker
|
||||
# 更新 wrangler.jsonc d1_databases 中的数据库 ID
|
||||
npx wrangler d1 execute webhooker --remote --file ./migrations/0001_init.sql
|
||||
npx wrangler d1 execute webhooker --remote --file ./migrations/0002_log_detail.sql
|
||||
npx wrangler d1 execute webhooker --remote --file ./migrations/0003_telegram_links.sql
|
||||
npm run db:migrate:prod # 将迁移应用到远端 D1 数据库
|
||||
|
||||
# 部署
|
||||
npx wrangler deploy
|
||||
|
||||
Reference in new issue
Block a user