20201111133905_maintenance_associations_cleanup.rb 328 B

12345678910
  1. class MaintenanceAssociationsCleanup < ActiveRecord::Migration[5.2]
  2. def change
  3. # return if it's a new setup
  4. return if !Setting.exists?(name: 'system_init_done')
  5. remove_reference :templates, :user, index: true, foreign_key: true
  6. remove_reference :text_modules, :user, index: true, foreign_key: true
  7. end
  8. end