summaryrefslogtreecommitdiff
path: root/model
diff options
context:
space:
mode:
Diffstat (limited to 'model')
-rw-r--r--model/database.go18
1 files changed, 10 insertions, 8 deletions
diff --git a/model/database.go b/model/database.go
index cdded4a..8e002d6 100644
--- a/model/database.go
+++ b/model/database.go
@@ -101,16 +101,18 @@ func MigrateDatabase(version string) {
if err != nil {
log.Fatalf("Failed to setup minimal database schema: %v", err)
}
- }
- query, err := GetSql(`migrate`)
- if err != nil {
- log.Fatal(err)
- }
- _, err = tx.Exec(query)
- if err != nil {
- return err
+ log.Println("Executing initial migration")
+ query, err := GetSql(`migrate`)
+ if err != nil {
+ log.Fatal(err)
+ }
+ _, err = tx.Exec(query)
+ if err != nil {
+ return err
+ }
}
+
return nil
})
if err != nil {