annotate .svn/pristine/68/68f2959a12b15f675878392447e35e71f3fc6417.svn-base @ 1517:dffacf8a6908 redmine-2.5

Update to Redmine SVN revision 13367 on 2.5-stable branch
author Chris Cannam
date Tue, 09 Sep 2014 09:29:00 +0100
parents cbb26bc654de
children
rev   line source
Chris@909 1 class RenameCommentToComments < ActiveRecord::Migration
Chris@909 2 def self.up
Chris@909 3 rename_column(:comments, :comment, :comments) if ActiveRecord::Base.connection.columns(Comment.table_name).detect{|c| c.name == "comment"}
Chris@909 4 rename_column(:wiki_contents, :comment, :comments) if ActiveRecord::Base.connection.columns(WikiContent.table_name).detect{|c| c.name == "comment"}
Chris@909 5 rename_column(:wiki_content_versions, :comment, :comments) if ActiveRecord::Base.connection.columns(WikiContent.versioned_table_name).detect{|c| c.name == "comment"}
Chris@909 6 rename_column(:time_entries, :comment, :comments) if ActiveRecord::Base.connection.columns(TimeEntry.table_name).detect{|c| c.name == "comment"}
Chris@909 7 rename_column(:changesets, :comment, :comments) if ActiveRecord::Base.connection.columns(Changeset.table_name).detect{|c| c.name == "comment"}
Chris@909 8 end
Chris@909 9
Chris@909 10 def self.down
Chris@909 11 raise IrreversibleMigration
Chris@909 12 end
Chris@909 13 end