From ca96df29085f9ca6567cd474d0920e48c6410b42 Mon Sep 17 00:00:00 2001 From: xengineering Date: Thu, 9 May 2024 21:48:56 +0200 Subject: model: Initial database version injection If the database was empty on startup a metadata table with a key and value row is created. In addition the Ceres executable version is inserted as value under the key 'version'. This allows to detect on not-empty databases which Ceres version was used before which is the starting point to implement migrations. --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'main.go') diff --git a/main.go b/main.go index 6c123da..4abe9ae 100644 --- a/main.go +++ b/main.go @@ -35,7 +35,7 @@ func main() { model.ConnectDatabase(filepath.Join(storage.Path, "ceres.sqlite3")) defer model.DisconnectDatabase() - model.MigrateDatabase() + model.MigrateDatabase(version) model.InjectTestRecipes() server := NewServer(config.HttpAddress) -- cgit v1.2.3-70-g09d2