mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Initial release of Discourse
This commit is contained in:
14
db/migrate/20120619150807_fix_post_timings.rb
Normal file
14
db/migrate/20120619150807_fix_post_timings.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
class FixPostTimings < ActiveRecord::Migration
|
||||
def up
|
||||
remove_index :post_timings, [:thread_id, :post_number]
|
||||
remove_index :post_timings, [:thread_id, :post_number, :user_id]
|
||||
rename_column :post_timings, :thread_id, :forum_thread_id
|
||||
add_index :post_timings, [:forum_thread_id, :post_number], name: 'post_timings_summary'
|
||||
add_index :post_timings, [:forum_thread_id, :post_number, :user_id], unique: true, name: 'post_timings_unique'
|
||||
|
||||
end
|
||||
|
||||
def down
|
||||
rename_column :post_timings, :forum_thread_id, :thread_id
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user