docs: migrate from VitePress to Fumadocs (Next.js)
- Replace VitePress with Fumadocs + Next.js for documentation site - Configure i18n (English + 简体中文) with language switcher - Migrate all 17 guide documents to MDX format with updated content - Add ocean theme, GitHub/Discord/QQ social links - Update GitHub Actions workflow for Next.js static export - Update .gitignore for .next, out, .source directories
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
---
|
||||
title: 数据库导出
|
||||
description: 将整个数据库导出为 SQL 文件,包含表结构和数据,适用于备份和迁移。
|
||||
---
|
||||
|
||||
DBX 支持将整个数据库导出为 SQL 文件,包含表结构(DDL)和数据,适用于数据库备份和迁移。
|
||||
|
||||
## 导出内容
|
||||
|
||||
导出的 SQL 文件包含:
|
||||
|
||||
- **表结构(DDL)** -- `CREATE TABLE` 语句,包括列定义、主键、索引、约束等
|
||||
- **表数据** -- 以 `INSERT` 语句的形式导出表中的数据
|
||||
|
||||
## 批量 INSERT 语句
|
||||
|
||||
为了提高导入效率,DBX 会将数据生成为批量 `INSERT` 语句,每条语句包含多行数据,减少执行次数,加快数据恢复速度。
|
||||
|
||||
示例:
|
||||
|
||||
```sql
|
||||
INSERT INTO users (id, name, email) VALUES
|
||||
(1, '张三', 'zhangsan@example.com'),
|
||||
(2, '李四', 'lisi@example.com'),
|
||||
(3, '王五', 'wangwu@example.com');
|
||||
```
|
||||
|
||||
## 配置选项
|
||||
|
||||
### 行数限制
|
||||
|
||||
你可以配置每张表导出的最大行数。这在以下场景中非常有用:
|
||||
|
||||
- 只需要导出表结构和少量示例数据时
|
||||
- 表中数据量过大,完整导出文件体积过大时
|
||||
- 需要创建用于开发或测试的精简数据集时
|
||||
|
||||
设置为 0 或留空表示导出全部数据。
|
||||
Reference in New Issue
Block a user