20190415000001_setting_es_multi_index.rb 520 B

123456789101112131415161718
  1. class SettingEsMultiIndex < 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: 'Elasticsearch Multi Index',
  7. name: 'es_multi_index',
  8. area: 'SearchIndex::Elasticsearch',
  9. description: 'Define if Elasticsearch is using multiple indexes.',
  10. state: false,
  11. preferences: { online_service_disable: true },
  12. frontend: false
  13. )
  14. end
  15. end