476d5bebf2
- Introduces a new option on the settings UI to optionally publish the full campaign body in public archive RSS feeds. Closes #1033 Co-authored-by: Kailash Nadh <kailash@nadh.in>
21 lines
461 B
Go
21 lines
461 B
Go
package migrations
|
|
|
|
import (
|
|
"github.com/jmoiron/sqlx"
|
|
"github.com/knadh/koanf"
|
|
"github.com/knadh/stuffbin"
|
|
)
|
|
|
|
// V2_5_0 performs the DB migrations.
|
|
func V2_5_0(db *sqlx.DB, fs stuffbin.FileSystem, ko *koanf.Koanf) error {
|
|
// Insert new preference settings.
|
|
if _, err := db.Exec(`
|
|
INSERT INTO settings (key, value) VALUES
|
|
('app.enable_public_archive_rss_content', 'false')
|
|
ON CONFLICT DO NOTHING;
|
|
`); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|