20201111133905_maintenance_associations_cleanup.rb 405 B

123456789101112
  1. # Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
  2. class MaintenanceAssociationsCleanup < ActiveRecord::Migration[5.2]
  3. def change
  4. # return if it's a new setup
  5. return if !Setting.exists?(name: 'system_init_done')
  6. remove_reference :templates, :user, index: true, foreign_key: true
  7. remove_reference :text_modules, :user, index: true, foreign_key: true
  8. end
  9. end