20190918114553_issue_2867_footer_header_public_link.rb 491 B

1234567891011121314
  1. class Issue2867FooterHeaderPublicLink < ActiveRecord::Migration[5.2]
  2. def up
  3. # return if it's a new setup
  4. return if !Setting.exists?(name: 'system_init_done')
  5. add_column :knowledge_base_menu_items, :location, :string, null: false, default: 'header'
  6. add_index :knowledge_base_menu_items, :location
  7. change_column_default :knowledge_base_menu_items, :location, nil
  8. end
  9. def down
  10. remove_column :knowledge_base_menu_items, :location
  11. end
  12. end