20221006075341_drop_karma.rb 436 B

123456789101112131415
  1. # Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/
  2. class DropKarma < ActiveRecord::Migration[6.1]
  3. def change
  4. # return if it's a new setup
  5. return if !Setting.exists?(name: 'system_init_done')
  6. drop_table :karma_activity_logs
  7. drop_table :karma_activities
  8. drop_table :karma_users
  9. Setting.find_by(name: 'karma_levels')&.destroy
  10. Setting.find_by(name: '9200_karma')&.destroy
  11. end
  12. end