Skip to content

Instantly share code, notes, and snippets.

@tobyturnbullknokal
Created May 16, 2016 00:34
Show Gist options
  • Save tobyturnbullknokal/5c1b6e19b3f5b98809a5f1b2c9440baf to your computer and use it in GitHub Desktop.
Save tobyturnbullknokal/5c1b6e19b3f5b98809a5f1b2c9440baf to your computer and use it in GitHub Desktop.
class CreateRatings < ActiveRecord::Migration
def change
create_table :ratings do |t|
t.references :comment, index: true, foreign_key: true
t.references :user, index: true, foreign_key: true
t.integer :score
t.string :default
t.string :0
t.timestamps null: false
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment