v2.1.0.go 553 B

1234567891011121314151617181920212223
  1. package migrations
  2. import (
  3. "github.com/jmoiron/sqlx"
  4. "github.com/knadh/koanf"
  5. "github.com/knadh/stuffbin"
  6. )
  7. // V2_1_0 performs the DB migrations for v.2.1.0.
  8. func V2_1_0(db *sqlx.DB, fs stuffbin.FileSystem, ko *koanf.Koanf) error {
  9. if _, err := db.Exec(`
  10. INSERT INTO settings (key, value) VALUES
  11. ('appearance.admin.custom_css', '""'),
  12. ('appearance.admin.custom_js', '""'),
  13. ('appearance.public.custom_css', '""'),
  14. ('appearance.public.custom_js', '""')
  15. ON CONFLICT DO NOTHING;
  16. `); err != nil {
  17. return err
  18. }
  19. return nil
  20. }