20190208000001_setting_timezone_default.rb 690 B

123456789101112131415161718192021222324252627
  1. class SettingTimezoneDefault < ActiveRecord::Migration[5.1]
  2. def up
  3. # return if it's a new setup
  4. return if !Setting.exists?(name: 'system_init_done')
  5. Setting.create_if_not_exists(
  6. title: 'Timezone',
  7. name: 'timezone_default',
  8. area: 'System::Branding',
  9. description: 'Defines the system default timezone.',
  10. options: {
  11. form: [
  12. {
  13. name: 'timezone_default',
  14. }
  15. ],
  16. },
  17. state: '',
  18. preferences: {
  19. prio: 9,
  20. controller: 'SettingsAreaItemDefaultTimezone',
  21. permission: ['admin.system'],
  22. },
  23. frontend: true
  24. )
  25. end
  26. end