20140728000001_update_setting1.rb 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. class UpdateSetting1 < ActiveRecord::Migration
  2. def up
  3. Setting.create_if_not_exists(
  4. :title => 'Send client stats',
  5. :name => 'ui_send_client_stats',
  6. :area => 'System::UI',
  7. :description => 'Send client stats to central server.',
  8. :options => {
  9. :form => [
  10. {
  11. :display => '',
  12. :null => true,
  13. :name => 'ui_send_client_stats',
  14. :tag => 'boolean',
  15. :options => {
  16. true => 'yes',
  17. false => 'no',
  18. },
  19. },
  20. ],
  21. },
  22. :state => true,
  23. :frontend => true
  24. )
  25. Setting.create_if_not_exists(
  26. :title => 'Client storage',
  27. :name => 'ui_client_storage',
  28. :area => 'System::UI',
  29. :description => 'Use client storage to cache data to perform speed of application.',
  30. :options => {
  31. :form => [
  32. {
  33. :display => '',
  34. :null => true,
  35. :name => 'ui_client_storage',
  36. :tag => 'boolean',
  37. :options => {
  38. true => 'yes',
  39. false => 'no',
  40. },
  41. },
  42. ],
  43. },
  44. :state => false,
  45. :frontend => true
  46. )
  47. end
  48. def down
  49. end
  50. end