20190918114553_issue_2867_footer_header_public_link.rb 568 B

12345678910111213141516
  1. # Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
  2. class Issue2867FooterHeaderPublicLink < ActiveRecord::Migration[5.2]
  3. def up
  4. # return if it's a new setup
  5. return if !Setting.exists?(name: 'system_init_done')
  6. add_column :knowledge_base_menu_items, :location, :string, null: false, default: 'header'
  7. add_index :knowledge_base_menu_items, :location
  8. change_column_default :knowledge_base_menu_items, :location, nil
  9. end
  10. def down
  11. remove_column :knowledge_base_menu_items, :location
  12. end
  13. end