Move migrations to internal/db/migrations (closes #96) #155

Merged
clawbot merged 1 commits from issue-96-migrations-path into next 2026-09-29 07:42:06 +02:00
1 Commits
Author SHA1 Message Date
clawbot 72322a49c7 Move migrations to internal/db/migrations (closes #96)
check / check (push) Successful in 3m13s
REPO_POLICIES.md puts migrations in internal/db/migrations/ as
000_migration.sql and 001_schema.sql. The two files move there with
their contents unchanged. go:embed cannot reach outside its own
package, so internal/db/migrations has a small package that embeds
them, and internal/database reads them through its FS(). The database
package stays where CONVENTIONS.md puts it; moving it would change
existing test files in other packages.

The version still comes from the filename prefix, so a database that
has recorded versions 0 and 1 runs neither again. A new test applies
the migrations twice to one database file and checks that the second
run applies nothing.

Model: opus-5-5
2026-09-29 05:00:17 +00:00