Skip to content

Instantly share code, notes, and snippets.

@jgrau
Created June 14, 2010 20:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jgrau/438278 to your computer and use it in GitHub Desktop.
Save jgrau/438278 to your computer and use it in GitHub Desktop.
class CreateViews < ActiveRecord::Migration
def self.up
create_table :views, :force => true do |t|
t.references :loggable, :polymorphic => true
t.string :session_id
t.string :originating_ip
t.string :uri
t.timestamps
end
end
def self.down
drop_table :views
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment