1234567891011121314151617181920212223242526272829303132 |
- class StoreConfigNameUpdateIssue428 < ActiveRecord::Migration[4.2]
- def up
- # return if it's a new setup
- return if !Setting.exists?(name: 'system_init_done')
- setting = Setting.find_by(name: 'storage')
- return if !setting
- setting.name = 'storage_provider'
- setting.options = {
- form: [
- {
- display: '',
- null: true,
- name: 'storage_provider',
- tag: 'select',
- tranlate: true,
- options: {
- 'DB' => 'Database',
- 'File' => 'Filesystem',
- },
- },
- ],
- }
- setting.preferences = {
- controller: 'SettingsAreaStorageProvider',
- online_service_disable: true,
- permission: ['admin.system'],
- }
- setting.save!
- end
- end
|