trabajo-afectivo/db/migrate/20190918114553_issue_2867_footer_header_public_link.rb

17 lines
568 B
Ruby
Raw Permalink Normal View History

2022-01-01 13:38:12 +00:00
# Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
class Issue2867FooterHeaderPublicLink < ActiveRecord::Migration[5.2]
def up
# return if it's a new setup
return if !Setting.exists?(name: 'system_init_done')
add_column :knowledge_base_menu_items, :location, :string, null: false, default: 'header'
add_index :knowledge_base_menu_items, :location
change_column_default :knowledge_base_menu_items, :location, nil
end
def down
remove_column :knowledge_base_menu_items, :location
end
end