20160921000001_permission_active.rb.rb 251 B

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