| Age | Commit message (Collapse) | Author |
|
This enforces a similar structure of test functions named `TestFooBar`
if they test the function `FooBar`.
|
|
This function will be used most by the production software to update
the database schema to the latest known version.
|
|
In case the test succeeds it is not required to log anything. This only
adds noise to the output.
|
|
This function gets the user_version SQLite3 field describing which
migration was the last executed one.
A test checking this before applying any migrations and after each
migration is included.
|
|
This adds the execution of the embedded migrations and adds a suitable
unit test.
|
|
This prepares the infrastructure to place migration SQL code in the
source repository with paths formatted as `sql/migrations/%04d.sqlite3`.
The numbers need to be counting up from 1.
They are embedded with Go's embed package and are parsed into a slice of
strings where the migration number minus one is the slice index and the
value is the migrations file as string.
This makes handling of migrations in code as easy as possible.
This commit adds also tests for this functionality.
|