修改部分项目讨论区描述仍为课程讨论区的描述
This commit is contained in:
parent
9e5f7e6fc6
commit
aa0caff077
|
@ -0,0 +1,20 @@
|
|||
# -*coding:utf-8 -*-
|
||||
class ChangeBoardsName < ActiveRecord::Migration
|
||||
def up
|
||||
boards = Board.where("project_id <> -1 and name like '%课程讨论区%'")
|
||||
boards.each do |board|
|
||||
board.name = "项目讨论区"
|
||||
board.description = "项目讨论区"
|
||||
board.save(:validate => false)
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
boards = Board.where("project_id <> -1 and name like '%项目讨论区%'")
|
||||
boards.each do |board|
|
||||
board.name = " 课程讨论区"
|
||||
board.description = " 课程讨论区"
|
||||
board.save(:validate => false)
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue