feat(02-01): add migration infrastructure with golang-migrate and embedded SQL
- RunMigrations applies versioned SQL files via golang-migrate + embed.FS (iofs) - ErrNoChange handled correctly - not treated as failure - Migration 0001 creates full current schema with CREATE TABLE IF NOT EXISTS - All three tables (updates, tags, tag_assignments) with acknowledged_at and ON DELETE CASCADE - Uses database/sqlite sub-package (modernc.org/sqlite, no CGO) - go mod tidy applied after adding dependencies
This commit is contained in:
7
go.mod
7
go.mod
@@ -2,9 +2,13 @@ module awesomeProject
|
||||
|
||||
go 1.26
|
||||
|
||||
require (
|
||||
github.com/golang-migrate/migrate/v4 v4.19.1
|
||||
modernc.org/sqlite v1.46.1
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/dustin/go-humanize v1.0.1 // indirect
|
||||
github.com/golang-migrate/migrate/v4 v4.19.1 // indirect
|
||||
github.com/google/uuid v1.6.0 // indirect
|
||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||
github.com/ncruces/go-strftime v1.0.0 // indirect
|
||||
@@ -14,5 +18,4 @@ require (
|
||||
modernc.org/libc v1.67.6 // indirect
|
||||
modernc.org/mathutil v1.7.1 // indirect
|
||||
modernc.org/memory v1.11.0 // indirect
|
||||
modernc.org/sqlite v1.46.1 // indirect
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user