feat(database): 添加 SQLite 数据库目录自动创建功能
- 为 SQLite 数据库添加数据库文件目录自动创建逻辑 - 实现 ensureSQLiteDirectory 方法解析数据库路径并创建必要目录 - 支持从 config.Name 或 config.Link 中提取 SQLite 文件路径 - 添加对 SQLite 链接格式 sqlite::@file(path) 的路径解析支持 - 在数据库表迁移前确保 SQLite 数据库文件目录存在 - 新增 sqlitecgo 驱动包实现 SQLite 数据库驱动支持
This commit is contained in:
@@ -50,3 +50,9 @@ func (d *Driver) New(core *database.Core, node *database.ConfigNode) (database.D
|
||||
func (d *Driver) GetChars() (charLeft string, charRight string) {
|
||||
return quoteChar, quoteChar
|
||||
}
|
||||
|
||||
// GetMigration returns a Migration instance implementing the Migration interface.
|
||||
// Note: sqlitecgo driver does not have migration support yet, returns nil.
|
||||
func (d *Driver) GetMigration() database.Migration {
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user