From caef609fc8ad68921e95697890d06583c9c55ce2 Mon Sep 17 00:00:00 2001 From: seaHi Date: Thu, 6 Aug 2026 12:14:14 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E6=9B=B4=E6=96=B0=20README=20=E5=85=B3?= =?UTF-8?q?=E4=BA=8E=E6=95=B0=E6=8D=AE=E5=BA=93=E8=BF=81=E7=A7=BB=E7=9A=84?= =?UTF-8?q?=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index bb7a0cd..9ac6cf5 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,18 @@ pnpm install pnpm dlx wrangler d1 execute blogflare-db --local --file=./schema.sql ``` +如果你已经初始化过数据库,请不要重新执行会重建表的 `schema.sql`,而应应用增量迁移: + +```bash +pnpm exec wrangler d1 migrations apply blogflare-db --local +``` + +部署新版本前,再将同一批迁移应用到远端数据库: + +```bash +pnpm exec wrangler d1 migrations apply blogflare-db --remote +``` + ### 3. 启动本地开发服务器 ```bash