mirror of
https://github.com/knadh/listmonk.git
synced 2025-09-25 07:46:53 +08:00
Add v4.1.0 migrations.
This commit is contained in:
parent
abe09d67ed
commit
18edc653a8
1 changed files with 21 additions and 0 deletions
21
internal/migrations/v4.1.0.go
Normal file
21
internal/migrations/v4.1.0.go
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
package migrations
|
||||||
|
|
||||||
|
import (
|
||||||
|
"log"
|
||||||
|
|
||||||
|
"github.com/jmoiron/sqlx"
|
||||||
|
"github.com/knadh/koanf/v2"
|
||||||
|
"github.com/knadh/stuffbin"
|
||||||
|
)
|
||||||
|
|
||||||
|
// V4_1_0 performs the DB migrations.
|
||||||
|
func V4_1_0(db *sqlx.DB, fs stuffbin.FileSystem, ko *koanf.Koanf, lo *log.Logger) error {
|
||||||
|
// Insert new preference settings.
|
||||||
|
if _, err := db.Exec(`
|
||||||
|
INSERT INTO settings (key, value) VALUES('bounce.forwardemail', '{"enabled": false, "key": ""}') ON CONFLICT DO NOTHING;
|
||||||
|
`); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue