feat: add database layer with schema migrations

Add internal/database package with SQLite3 connection management,
versioned migration system, and three schema tables (artist_settings,
external_releases, notifications_sent). Includes 7 tests covering
initialization, migration idempotency, Close() behavior, and schema
validation using in-memory SQLite.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-20 08:58:23 +03:00
parent 6ff4ec3045
commit da6668204f
5 changed files with 368 additions and 11 deletions

5
go.mod
View File

@@ -2,4 +2,7 @@ module naviwatcher
go 1.25.1
require gopkg.in/yaml.v3 v3.0.1 // indirect
require (
github.com/mattn/go-sqlite3 v1.14.22
gopkg.in/yaml.v3 v3.0.1
)