Initial release of Discourse

This commit is contained in:
Robin Ward
2013-02-05 14:16:51 -05:00
commit 21b5628528
2932 changed files with 143949 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
class MigrateBookmarksToPostActions < ActiveRecord::Migration
def up
execute "insert into post_actions(user_id, post_action_type_id, post_id, created_at, updated_at)
select distinct b.user_id, #{PostActionType.bookmark.id} , p.id, b.created_at, b.updated_at
from bookmarks b
join posts p on p.forum_thread_id = b.forum_thread_id and p.post_number = b.post_number"
drop_table "bookmarks"
end
def down
# I can reverse this, but not really worth the work
raise ActiveRecord::IrriversableMigration
end
end