Skip to content

Commit

Permalink
db: remove goose for now
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianChiarulli committed Dec 31, 2024
1 parent bc6fe0c commit 9a810ec
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 15 deletions.
17 changes: 8 additions & 9 deletions backend/db/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"github.com/adrg/xdg"
"github.com/jmoiron/sqlx"
_ "github.com/mattn/go-sqlite3"
"github.com/pressly/goose/v3"
)

// Database instance
Expand All @@ -31,16 +30,16 @@ func Init(embedMigrations embed.FS) {
}
DB = dbConn

goose.SetBaseFS(embedMigrations)
// goose.SetBaseFS(embedMigrations)

if err := goose.SetDialect("sqlite3"); err != nil {
panic(err)
}
// if err := goose.SetDialect("sqlite3"); err != nil {
// panic(err)
// }

// Perform migrations
if err := goose.Up(DB.DB, "migrations"); err != nil {
log.Fatalf("Failed to apply migrations: %v", err)
}
// // Perform migrations
// if err := goose.Up(DB.DB, "migrations"); err != nil {
// log.Fatalf("Failed to apply migrations: %v", err)
// }

// List of table schemas
tableSchemas := []string{
Expand Down
7 changes: 1 addition & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@ require (
github.com/wailsapp/wails/v3 v3.0.0-alpha.8.3
)

require (
github.com/mfridman/interpolate v0.0.2 // indirect
github.com/sethvargo/go-retry v0.3.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
)
require github.com/stretchr/testify v1.10.0 // indirect

require (
dario.cat/mergo v1.0.1 // indirect
Expand Down Expand Up @@ -43,7 +39,6 @@ require (
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/pjbgf/sha1cd v0.3.0 // indirect
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect
github.com/pressly/goose/v3 v3.24.0
github.com/rivo/uniseg v0.4.7 // indirect
github.com/samber/lo v1.38.1 // indirect
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect
Expand Down

0 comments on commit 9a810ec

Please sign in to comment.