]> source.dussan.org Git - redmine.git/commitdiff
fix db migrate broken by r16889 (#26548)
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 27 Jul 2017 04:05:40 +0000 (04:05 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 27 Jul 2017 04:05:40 +0000 (04:05 +0000)
Contributed by Pavel Rosický.

git-svn-id: http://svn.redmine.org/redmine/trunk@16893 e93f8b46-1217-0410-a6f0-8f06a7374b81

db/migrate/041_rename_comment_to_comments.rb

index dcf537bbc798bb867656927e40a30a42ddcceaa8..02391091a7cec782cef0fd9fd8a63646b4c79b80 100644 (file)
@@ -2,7 +2,7 @@ class RenameCommentToComments < ActiveRecord::Migration[4.2]
   def self.up
     rename_column(:comments, :comment, :comments) if ActiveRecord::Base.connection.columns(Comment.table_name).detect{|c| c.name == "comment"}
     rename_column(:wiki_contents, :comment, :comments) if ActiveRecord::Base.connection.columns(WikiContent.table_name).detect{|c| c.name == "comment"}
-    rename_column(:wiki_content_versions, :comment, :comments) if ActiveRecord::Base.connection.columns(WikiContent.versioned_table_name).detect{|c| c.name == "comment"}
+    rename_column(:wiki_content_versions, :comment, :comments) if ActiveRecord::Base.connection.columns(WikiContentVersion.table_name).detect{|c| c.name == "comment"}
     rename_column(:time_entries, :comment, :comments) if ActiveRecord::Base.connection.columns(TimeEntry.table_name).detect{|c| c.name == "comment"}
     rename_column(:changesets, :comment, :comments) if ActiveRecord::Base.connection.columns(Changeset.table_name).detect{|c| c.name == "comment"}
   end