summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2024-05-09 10:02:00 +0200
committerxengineering <me@xengineering.eu>2024-05-09 10:02:00 +0200
commita2038b0ea35d1466c84e6e04a2e4597fc038815a (patch)
treefe94c7992dc5f7efb2b8266a5974be2430980cbf /main.go
parent0ba1a7661a81200db98e40149eef1e39fd22f407 (diff)
downloadceres-a2038b0ea35d1466c84e6e04a2e4597fc038815a.tar
ceres-a2038b0ea35d1466c84e6e04a2e4597fc038815a.tar.zst
ceres-a2038b0ea35d1466c84e6e04a2e4597fc038815a.zip
Restructure database-related functions
Diffstat (limited to 'main.go')
-rw-r--r--main.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/main.go b/main.go
index 223a7df..6c123da 100644
--- a/main.go
+++ b/main.go
@@ -33,9 +33,9 @@ func main() {
}
log.Printf("Storage directory: %s\n", storage.Path)
- model.InitDatabase(filepath.Join(storage.Path, "ceres.sqlite3"))
- defer model.CloseDatabase()
-
+ model.ConnectDatabase(filepath.Join(storage.Path, "ceres.sqlite3"))
+ defer model.DisconnectDatabase()
+ model.MigrateDatabase()
model.InjectTestRecipes()
server := NewServer(config.HttpAddress)