mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-24 08:09:13 -05:00
13 lines
454 B
Ruby
13 lines
454 B
Ruby
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
|
|
t.integer :ip, null: false, limit: 8
|
|
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
|