update database driver to modernc.org/sqlite and add Dockerfile with multi-stage build

This commit is contained in:
2025-07-28 19:10:32 -04:00
parent f5742527f6
commit 5ac3032a16
3 changed files with 30 additions and 4 deletions

View File

@@ -4,7 +4,8 @@ import (
"context"
"database/sql"
sqlc "git.siteworxpro.com/gun-manager/sql/db"
_ "github.com/mattn/go-sqlite3"
_ "modernc.org/sqlite"
)
type Db struct {
@@ -20,7 +21,7 @@ func NewDb(file string) (*Db, error) {
return &dbConnection, nil
}
db, err := sql.Open("sqlite3", file)
db, err := sql.Open("sqlite", file)
if err != nil {
return nil, err
}