Add documentation for metadata database

Add documentation and explanation for migrations.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
This commit is contained in:
Derek McGowan
2017-10-05 17:03:38 -07:00
parent 8558b98eb1
commit e4defbcb6d
2 changed files with 32 additions and 0 deletions

View File

@@ -8,6 +8,16 @@ type migration struct {
migrate func(*bolt.Tx) error
}
// migrations stores the list of database migrations
// for each update to the database schema. The migrations
// array MUST be ordered by version from least to greatest.
// The last entry in the array should correspond to the
// schemaVersion and dbVersion constants.
// A migration test MUST be added for each migration in
// the array.
// The migrate function can safely assume the version
// of the data it is migrating from is the previous version
// of the database.
var migrations = []migration{
{
schema: "v1",