v0.9.0.go 510 B

1234567891011121314151617181920
  1. package migrations
  2. import (
  3. "github.com/jmoiron/sqlx"
  4. "github.com/knadh/koanf"
  5. "github.com/knadh/stuffbin"
  6. )
  7. // V0_9_0 performs the DB migrations for v.0.9.0.
  8. func V0_9_0(db *sqlx.DB, fs stuffbin.FileSystem, ko *koanf.Koanf) error {
  9. _, err := db.Exec(`
  10. INSERT INTO settings (key, value) VALUES
  11. ('app.lang', '"en"'),
  12. ('app.message_sliding_window', 'false'),
  13. ('app.message_sliding_window_duration', '"1h"'),
  14. ('app.message_sliding_window_rate', '10000')
  15. ON CONFLICT DO NOTHING;
  16. `)
  17. return err
  18. }