diff options
author | Grail Finder <wohilas@gmail.com> | 2024-12-31 13:25:13 +0300 |
---|---|---|
committer | Grail Finder <wohilas@gmail.com> | 2024-12-31 13:25:13 +0300 |
commit | 461d19aa2512fea7ac07e50c3178609850ef07c3 (patch) | |
tree | 1e317b813686ca7696e96bba766cdbd3aeb35138 /storage/migrate.go | |
parent | 4db8aea43dded3f2c1d0d41b5a3fb322a38d4730 (diff) |
Feat: add rag [wip; skip-ci]
Diffstat (limited to 'storage/migrate.go')
-rw-r--r-- | storage/migrate.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/storage/migrate.go b/storage/migrate.go index d97b99d..3c4ca21 100644 --- a/storage/migrate.go +++ b/storage/migrate.go @@ -5,6 +5,8 @@ import ( "fmt" "io/fs" "strings" + + _ "github.com/asg017/sqlite-vec-go-bindings/ncruces" ) //go:embed migrations/* @@ -27,6 +29,7 @@ func (p *ProviderSQL) Migrate() { err := p.executeMigration(migrationsDir, file.Name()) if err != nil { p.logger.Error("Failed to execute migration %s: %v", file.Name(), err) + panic(err) } } } @@ -51,7 +54,7 @@ func (p *ProviderSQL) executeMigration(migrationsDir fs.FS, fileName string) err func (p *ProviderSQL) executeSQL(sqlContent []byte) error { // Connect to the database (example using a simple connection) - _, err := p.db.Exec(string(sqlContent)) + err := p.s3Conn.Exec(string(sqlContent)) if err != nil { return fmt.Errorf("failed to execute SQL: %w", err) } |