discourse/db/migrate/20120813201426_create_forum...

14 lines
448 B
Ruby
Raw Normal View History

2013-02-05 14:16:51 -05:00
class CreateForumThreadLinkClicks < ActiveRecord::Migration
def change
create_table :forum_thread_link_clicks do |t|
t.references :forum_thread_link, null: false
t.references :user, null: true
2013-02-25 11:42:20 -05:00
t.integer :ip, null: false, limit: 8
2013-02-05 14:16:51 -05:00
t.timestamps
end
add_column :forum_thread_links, :clicks, :integer, default: 0, null: false
add_index :forum_thread_link_clicks, :forum_thread_link_id, as: :by_link
end
end