20170126091128_application_secret_setting.rb 501 B

1234567891011121314151617181920
  1. class ApplicationSecretSetting < ActiveRecord::Migration[4.2]
  2. def up
  3. # return if it's a new setup
  4. return if !Setting.find_by(name: 'system_init_done')
  5. Setting.create_if_not_exists(
  6. title: 'Application secret',
  7. name: 'application_secret',
  8. area: 'Core',
  9. description: 'Defines the random application secret.',
  10. options: {},
  11. state: SecureRandom.hex(128),
  12. preferences: {
  13. permission: ['admin'],
  14. },
  15. frontend: false
  16. )
  17. end
  18. end