Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Rails 4 Tracker - Migration
class CreateFixtureDownloadTrackers < ActiveRecord::Migration
def change
create_table :fixture_download_trackers do |t|
t.integer :fixture_id
t.string :object_key
t.integer :download_count, default: 0
t.timestamps
end
add_index :fixture_download_trackers, [ :fixture_id, :object_key ], :unique => true, :name => :tracker_index
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.