1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

fix: double counting when using precise missing intervals

This commit is contained in:
Ferdinand Mütsch
2022-04-18 15:18:01 +02:00
parent e774039831
commit 5276f68918
7 changed files with 881 additions and 894 deletions

View File

@@ -2,6 +2,7 @@ package main
import (
"embed"
"github.com/muety/wakapi/migrations"
"io/fs"
"log"
"net"
@@ -16,7 +17,6 @@ import (
"github.com/emvi/logbuch"
"github.com/gorilla/handlers"
conf "github.com/muety/wakapi/config"
"github.com/muety/wakapi/migrations"
"github.com/muety/wakapi/repositories"
"github.com/muety/wakapi/routes/api"
"github.com/muety/wakapi/services/mail"
@@ -138,7 +138,9 @@ func main() {
defer sqlDb.Close()
// Migrate database schema
migrations.Run(db, config)
if !config.SkipMigrations {
migrations.Run(db, config)
}
// Repositories
aliasRepository = repositories.NewAliasRepository(db)