discourse/db/migrate/20120518200115_create_read_posts.rb

18 lines
418 B
Ruby
Raw Normal View History

2013-02-05 13:16:51 -06:00
class CreateReadPosts < ActiveRecord::Migration
def up
create_table :read_posts, id: false do |t|
t.integer :forum_thread_id, null: false
t.integer :user_id, null: false
t.column :page, :integer, null: false
t.column :seen, :integer, null: false
end
add_index :read_posts, [:forum_thread_id, :user_id, :page], unique: true
2013-02-05 13:16:51 -06:00
end
def down
drop_table :read_posts
end
end