mirror of
https://github.com/dreamhunter2333/cloudflare_temp_email.git
synced 2026-07-12 16:02:10 +08:00
feat: add docs (#122)
This commit is contained in:
25
vitepress-docs/docs/zh/guide/ui/d1.md
Normal file
25
vitepress-docs/docs/zh/guide/ui/d1.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# 初始化/更新 D1 数据库
|
||||
|
||||
## 初始化数据库
|
||||
|
||||
打开 cloudflare 控制台,选择 `Workers & Pages` -> `D1` -> `Create Database`,点击创建数据库
|
||||
|
||||

|
||||
|
||||
创建完成后,我们在 cloudflare 的控制台可以看到 D1 数据库
|
||||
|
||||
打开 `Console` 标签页,输入 `db/schema.sql` 的内容,点击 `Execute` 执行
|
||||
|
||||

|
||||
|
||||
## 更新数据库 schema
|
||||
|
||||
`schema` 更新,请确认你之前部署的版本,
|
||||
|
||||
查看 [更新日志](https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/CHANGELOG.md)
|
||||
|
||||
找到需要执行的 `patch` 文件, 执行, 例如: `db/2024-01-13-patch.sql`
|
||||
|
||||
打开 `Console` 标签页,输入 `patch` 文件的内容,点击 `Execute` 执行
|
||||
|
||||

|
||||
Reference in New Issue
Block a user