From 2be231b982a9bf53e88bdaf60a521df431b9bddb Mon Sep 17 00:00:00 2001 From: Marius Balteanu Date: Wed, 28 Jul 2021 16:26:22 +0000 Subject: [PATCH] Removes unused column trackers.is_in_chlog (#31132). git-svn-id: http://svn.redmine.org/redmine/trunk@21106 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- db/migrate/20210728131544_drop_is_in_chlog_column.rb | 9 +++++++++ lib/redmine/default_data/loader.rb | 6 +++--- test/fixtures/trackers.yml | 11 ++++------- 3 files changed, 16 insertions(+), 10 deletions(-) create mode 100644 db/migrate/20210728131544_drop_is_in_chlog_column.rb diff --git a/db/migrate/20210728131544_drop_is_in_chlog_column.rb b/db/migrate/20210728131544_drop_is_in_chlog_column.rb new file mode 100644 index 000000000..541239e97 --- /dev/null +++ b/db/migrate/20210728131544_drop_is_in_chlog_column.rb @@ -0,0 +1,9 @@ +class DropIsInChlogColumn < ActiveRecord::Migration[6.1] + def self.up + remove_column :trackers, :is_in_chlog + end + + def self.down + add_column :trackers, :is_in_chlog, :boolean, :default => true, :null => false + end +end diff --git a/lib/redmine/default_data/loader.rb b/lib/redmine/default_data/loader.rb index 35bce70d2..27e2288b3 100644 --- a/lib/redmine/default_data/loader.rb +++ b/lib/redmine/default_data/loader.rb @@ -155,9 +155,9 @@ module Redmine rejected = IssueStatus.create!(:name => l(:default_issue_status_rejected), :is_closed => true, :position => 6) # Trackers - bug = Tracker.create!(:name => l(:default_tracker_bug), :default_status_id => new.id, :is_in_chlog => true, :is_in_roadmap => false, :position => 1) - feature = Tracker.create!(:name => l(:default_tracker_feature), :default_status_id => new.id, :is_in_chlog => true, :is_in_roadmap => true, :position => 2) - support = Tracker.create!(:name => l(:default_tracker_support), :default_status_id => new.id, :is_in_chlog => false, :is_in_roadmap => false, :position => 3) + bug = Tracker.create!(:name => l(:default_tracker_bug), :default_status_id => new.id, :is_in_roadmap => false, :position => 1) + feature = Tracker.create!(:name => l(:default_tracker_feature), :default_status_id => new.id, :is_in_roadmap => true, :position => 2) + support = Tracker.create!(:name => l(:default_tracker_support), :default_status_id => new.id, :is_in_roadmap => false, :position => 3) # Set trackers as defaults for new projects Setting.default_projects_tracker_ids = [ diff --git a/test/fixtures/trackers.yml b/test/fixtures/trackers.yml index 41602a78f..d5022da6b 100644 --- a/test/fixtures/trackers.yml +++ b/test/fixtures/trackers.yml @@ -1,21 +1,18 @@ ---- -trackers_001: +--- +trackers_001: name: Bug id: 1 - is_in_chlog: true default_status_id: 1 position: 1 description: Description for Bug tracker -trackers_002: +trackers_002: name: Feature request id: 2 - is_in_chlog: true default_status_id: 1 position: 2 description: Description for Feature request tracker -trackers_003: +trackers_003: name: Support request id: 3 - is_in_chlog: false default_status_id: 1 position: 3 -- 2.39.5