项目创建类型迁移

This commit is contained in:
huang 2016-03-24 13:57:52 +08:00
parent 1330f02db8
commit a9ef2c28e2
3 changed files with 11 additions and 4 deletions

View File

@ -78,7 +78,6 @@
<!--缺陷动态-->
<% when "Issue" %>
<%= render :partial => 'users/project_issue', :locals => {:activity => activity.forge_act, :user_activity_id => activity.id, :project_id => activity.project_id} %>
<!--message -->
<% when "Message" %>
<%= render :partial => 'users/project_message', :locals => {:activity => activity.forge_act,:user_activity_id =>activity.id,:is_course=>1,:is_board=>0} %>

View File

@ -0,0 +1,8 @@
class ChangeProjectCreateType < ActiveRecord::Migration
def up
execute("update forge_activities set forge_act_type = 'Project' where forge_act_type = 'ProjectCreateInfo'")
end
def down
end
end

View File

@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20160321080825) do
ActiveRecord::Schema.define(:version => 20160324052634) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false
@ -465,7 +465,6 @@ ActiveRecord::Schema.define(:version => 20160321080825) do
t.integer "status"
end
add_index "course_messages", ["course_message_id"], :name => "index_course_messages_on_course_message_id"
add_index "course_messages", ["course_message_type"], :name => "index_course_messages_on_course_message_type"
add_index "course_messages", ["user_id", "course_id", "created_at"], :name => "index_course_messages_on_user_id_and_course_id_and_created_at"
@ -1088,7 +1087,8 @@ ActiveRecord::Schema.define(:version => 20160321080825) do
t.datetime "updated_at", :null => false
end
add_index "message_alls", ["message_id", "message_type", "created_at"], :name => "index_message_alls_on_message_id_and_message_type_and_created_at"
add_index "message_alls", ["message_type"], :name => "index_message_alls_on_message_type"
add_index "message_alls", ["user_id", "message_id", "created_at"], :name => "index_message_alls_on_user_id_and_message_id_and_created_at"
create_table "messages", :force => true do |t|
t.integer "board_id", :null => false