High performance, self-hosted, newsletter and mailing list manager with a modern dashboard. Single binary app.
JavaScript campaigncampaign-managementemail-marketingemail-subscriptionlistmonkmailing-listnewsletternewsletter-managementnewsletter-softwareself-hostedsms-gatewaysmtptransactional-emails
Switch migration version to v5
Kailash Nadh11f52ee8a344
diff --git a/cmd/upgrade.go b/cmd/upgrade.goindex 5a5bee21..c74f2c28 100644--- a/cmd/upgrade.go+++ b/cmd/upgrade.go@@ -40,7 +40,7 @@ var migList = []migFunc{{"v3.0.0", migrations.V3_0_0},{"v4.0.0", migrations.V4_0_0},{"v4.1.0", migrations.V4_1_0},- {"v5.0.0-rc.1", migrations.V5_0_0_rc1},+ {"v5.0.0", migrations.V5_0_0},}// upgrade upgrades the database to the current version by running SQL migration filesdiff --git a/internal/migrations/v5.0.0.go b/internal/migrations/v5.0.0.goindex 22b7907a..16aae355 100644--- a/internal/migrations/v5.0.0.go+++ b/internal/migrations/v5.0.0.go@@ -8,8 +8,8 @@ import ("github.com/knadh/stuffbin")-// V5_0_0_rc1 performs the DB migrations.-func V5_0_0_rc1(db *sqlx.DB, fs stuffbin.FileSystem, ko *koanf.Koanf, lo *log.Logger) error {+// V5_0_0 performs the DB migrations.+func V5_0_0(db *sqlx.DB, fs stuffbin.FileSystem, ko *koanf.Koanf, lo *log.Logger) error {lo.Println("IMPORTANT: this upgrade might take a while if you have a large database. Please be patient ...")if _, err := db.Exec(`-- Create a new temp materialized view with the fixed query (removing COUNT(*) that returns 1 for NULLs)