- db.Open: delegate to mcdsl/db.Open (WAL, FK, busy timeout, 0600) - db.Migrate: convert function-based migrations to mcdsl/db.Migration SQL strings, delegate to mcdsl/db.Migrate - db.Snapshot: delegate to mcdsl/db.Snapshot (adds 0600 permissions) - config: replace local Duration with mcdsl/config.Duration alias, replace Load with mcdsl/config.Load[T] + Validator interface - Remove direct modernc.org/sqlite and go-toml/v2 dependencies (now indirect via mcdsl) - Update TestEnvOverrideInvalidDuration: mcdsl silently ignores invalid env duration values (behavioral change from migration) - All existing tests pass Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
12 lines
292 B
Go
12 lines
292 B
Go
package db
|
|
|
|
import (
|
|
mcdsldb "git.wntrmute.dev/kyle/mcdsl/db"
|
|
)
|
|
|
|
// Snapshot creates a consistent backup of the database using VACUUM INTO.
|
|
// The destination file is created with 0600 permissions.
|
|
func (s *Store) Snapshot(destPath string) error {
|
|
return mcdsldb.Snapshot(s.db, destPath)
|
|
}
|