20160921000001_permission_active.rb.rb 256 B

12345678910
  1. class PermissionActive < ActiveRecord::Migration[4.2]
  2. def up
  3. # return if it's a new setup
  4. return if !Setting.exists?(name: 'system_init_done')
  5. add_column :permissions, :active, :boolean, null: false, default: true
  6. Cache.clear
  7. end
  8. end