summaryrefslogtreecommitdiffstats
path: root/lib/tasks/migrate_from_mantis.rake
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-04-27 16:31:51 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-04-27 16:31:51 +0000
commitf2ec23d80cf40157644938b438aec1aa4e119043 (patch)
treefe81ccde2fdf364d39ddf2b3a85c3d1e07d99cc8 /lib/tasks/migrate_from_mantis.rake
parentd940797aa79f9c12df154422768096f77285e378 (diff)
downloadredmine-f2ec23d80cf40157644938b438aec1aa4e119043.tar.gz
redmine-f2ec23d80cf40157644938b438aec1aa4e119043.zip
set_table_name deprecated.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9550 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/tasks/migrate_from_mantis.rake')
-rw-r--r--lib/tasks/migrate_from_mantis.rake32
1 files changed, 16 insertions, 16 deletions
diff --git a/lib/tasks/migrate_from_mantis.rake b/lib/tasks/migrate_from_mantis.rake
index e74b8797b..e602455af 100644
--- a/lib/tasks/migrate_from_mantis.rake
+++ b/lib/tasks/migrate_from_mantis.rake
@@ -84,7 +84,7 @@ task :migrate_from_mantis => :environment do
}
class MantisUser < ActiveRecord::Base
- set_table_name :mantis_user_table
+ self.table_name = :mantis_user_table
def firstname
@firstname = realname.blank? ? username : realname.split.first[0..29]
@@ -112,7 +112,7 @@ task :migrate_from_mantis => :environment do
end
class MantisProject < ActiveRecord::Base
- set_table_name :mantis_project_table
+ self.table_name = :mantis_project_table
has_many :versions, :class_name => "MantisVersion", :foreign_key => :project_id
has_many :categories, :class_name => "MantisCategory", :foreign_key => :project_id
has_many :news, :class_name => "MantisNews", :foreign_key => :project_id
@@ -124,7 +124,7 @@ task :migrate_from_mantis => :environment do
end
class MantisVersion < ActiveRecord::Base
- set_table_name :mantis_project_version_table
+ self.table_name = :mantis_project_version_table
def version
read_attribute(:version)[0..29]
@@ -136,15 +136,15 @@ task :migrate_from_mantis => :environment do
end
class MantisCategory < ActiveRecord::Base
- set_table_name :mantis_project_category_table
+ self.table_name = :mantis_project_category_table
end
class MantisProjectUser < ActiveRecord::Base
- set_table_name :mantis_project_user_list_table
+ self.table_name = :mantis_project_user_list_table
end
class MantisBug < ActiveRecord::Base
- set_table_name :mantis_bug_table
+ self.table_name = :mantis_bug_table
belongs_to :bug_text, :class_name => "MantisBugText", :foreign_key => :bug_text_id
has_many :bug_notes, :class_name => "MantisBugNote", :foreign_key => :bug_id
has_many :bug_files, :class_name => "MantisBugFile", :foreign_key => :bug_id
@@ -152,7 +152,7 @@ task :migrate_from_mantis => :environment do
end
class MantisBugText < ActiveRecord::Base
- set_table_name :mantis_bug_text_table
+ self.table_name = :mantis_bug_text_table
# Adds Mantis steps_to_reproduce and additional_information fields
# to description if any
@@ -165,17 +165,17 @@ task :migrate_from_mantis => :environment do
end
class MantisBugNote < ActiveRecord::Base
- set_table_name :mantis_bugnote_table
+ self.table_name = :mantis_bugnote_table
belongs_to :bug, :class_name => "MantisBug", :foreign_key => :bug_id
belongs_to :bug_note_text, :class_name => "MantisBugNoteText", :foreign_key => :bugnote_text_id
end
class MantisBugNoteText < ActiveRecord::Base
- set_table_name :mantis_bugnote_text_table
+ self.table_name = :mantis_bugnote_text_table
end
class MantisBugFile < ActiveRecord::Base
- set_table_name :mantis_bug_file_table
+ self.table_name = :mantis_bug_file_table
def size
filesize
@@ -200,19 +200,19 @@ task :migrate_from_mantis => :environment do
end
class MantisBugRelationship < ActiveRecord::Base
- set_table_name :mantis_bug_relationship_table
+ self.table_name = :mantis_bug_relationship_table
end
class MantisBugMonitor < ActiveRecord::Base
- set_table_name :mantis_bug_monitor_table
+ self.table_name = :mantis_bug_monitor_table
end
class MantisNews < ActiveRecord::Base
- set_table_name :mantis_news_table
+ self.table_name = :mantis_news_table
end
class MantisCustomField < ActiveRecord::Base
- set_table_name :mantis_custom_field_table
+ self.table_name = :mantis_custom_field_table
set_inheritance_column :none
has_many :values, :class_name => "MantisCustomFieldString", :foreign_key => :field_id
has_many :projects, :class_name => "MantisCustomFieldProject", :foreign_key => :field_id
@@ -227,11 +227,11 @@ task :migrate_from_mantis => :environment do
end
class MantisCustomFieldProject < ActiveRecord::Base
- set_table_name :mantis_custom_field_project_table
+ self.table_name = :mantis_custom_field_project_table
end
class MantisCustomFieldString < ActiveRecord::Base
- set_table_name :mantis_custom_field_string_table
+ self.table_name = :mantis_custom_field_string_table
end