From 391cc1e5b41ed289fc462a0379de3ca05e797ae5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferdinand=20M=C3=BCtsch?= Date: Fri, 6 Aug 2021 17:17:06 +0200 Subject: [PATCH] chore: fix syntax for postgres --- migrations/20210806_remove_persisted_project_labels.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/migrations/20210806_remove_persisted_project_labels.go b/migrations/20210806_remove_persisted_project_labels.go index 5af6ced..d7077ef 100644 --- a/migrations/20210806_remove_persisted_project_labels.go +++ b/migrations/20210806_remove_persisted_project_labels.go @@ -1,6 +1,7 @@ package migrations import ( + "fmt" "github.com/emvi/logbuch" "github.com/muety/wakapi/config" "github.com/muety/wakapi/models" @@ -28,7 +29,7 @@ func init() { logbuch.Error("failed to retrieve raw sql db instance") return err } - if _, err := rawDb.Exec("delete from summary_items where type = ?", models.SummaryLabel); err != nil { + if _, err := rawDb.Exec(fmt.Sprintf("delete from summary_items where type = %d", models.SummaryLabel)); err != nil { logbuch.Error("failed to delete project label summary items") return err }