annotate .svn/pristine/68/68f2959a12b15f675878392447e35e71f3fc6417.svn-base @ 1628:9c5f8e24dadc live tip

Quieten this cron script
author Chris Cannam
date Tue, 25 Aug 2020 11:38:49 +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