discourse/db/migrate/20120619150807_fix_post_tim...

Failed to ignore revisions in .git-blame-ignore-revs.

17 lines
580 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class FixPostTimings < ActiveRecord::Migration[4.2]
2013-02-05 14:16:51 -05:00
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'
2013-02-25 11:42:20 -05:00
add_index :post_timings, [:forum_thread_id, :post_number, :user_id], unique: true, name: 'post_timings_unique'
2013-02-05 14:16:51 -05:00
end
def down
2013-02-25 11:42:20 -05:00
rename_column :post_timings, :forum_thread_id, :thread_id
2013-02-05 14:16:51 -05:00
end
end