forked from imbytecat/fullstack-starter
feat: 迁移数据库至SQLite并适配嵌入式环境
- 添加SQLite数据库文件及数据目录的忽略规则 - 将数据库连接地址更新为本地SQLite数据库文件路径 - 将数据库从 PostgreSQL 迁移至 SQLite,更新依赖、Drizzle 方言及数据类型映射,确保嵌入式环境兼容性并保持应用层代码不变。 - 将数据库方言从 PostgreSQL 更改为 SQLite。 - 将数据库依赖从 postgres 替换为 better-sqlite3,并添加 better-sqlite3 的类型定义。 - 修改数据库连接字符串验证规则,从URL格式验证改为非空字符串验证。 - 将数据库连接从 PostgreSQL 切换为 Better-SQLite3,并支持创建目录和内存数据库。 - 将 todo 表的 completed 字段从 PostgreSQL 的 boolean 类型改为 SQLite 的 boolean 模式整数类型。 - 将字段定义从 PostgreSQL 适配改为 SQLite 适配,使用文本类型 ID 和时间戳整数类型,并统一使用 UUIDv7 和当前时间作为默认值。 - 添加 better-sqlite3 及其类型定义,并引入相关依赖以支持其功能 - 添加 better-sqlite3 依赖并移除 postgres 依赖
This commit is contained in:
@@ -40,6 +40,7 @@
|
||||
"@tanstack/react-router-devtools": "^1.157.14",
|
||||
"@tanstack/react-router-ssr-query": "^1.157.14",
|
||||
"@tanstack/react-start": "^1.157.14",
|
||||
"@types/better-sqlite3": "^7.6.12",
|
||||
"@types/bun": "^1.3.6",
|
||||
"@vitejs/plugin-react": "^5.1.2",
|
||||
"babel-plugin-react-compiler": "^1.0.0",
|
||||
@@ -49,7 +50,7 @@
|
||||
"effect": "^3.19.15",
|
||||
"nitro": "npm:nitro-nightly@3.0.1-20260125-215009-8882bc9e",
|
||||
"ohash": "^2.0.11",
|
||||
"postgres": "^3.4.8",
|
||||
"better-sqlite3": "^11.8.1",
|
||||
"react": "^19.2.3",
|
||||
"react-dom": "^19.2.3",
|
||||
"tailwindcss": "^4.1.18",
|
||||
|
||||
Reference in New Issue
Block a user