Skip to content

Instantly share code, notes, and snippets.

@johnheywardobrien
Created April 10, 2015 23:16
Show Gist options
  • Save johnheywardobrien/bff0befe5d3aee0540d5 to your computer and use it in GitHub Desktop.
Save johnheywardobrien/bff0befe5d3aee0540d5 to your computer and use it in GitHub Desktop.
working on creating my migrations..
class AddMonitors < ActiveRecord::Migration
def change
create_table :monitors do |t|
t.string :tag
t.timestamps null: false
has_many :calibrations
end
end
end
class AddCalibrations < ActiveRecord::Migration
def change
create_table :calibrations do |t|
t.string :x_value
t.string :y_value
t.string :attempts
t.string :green
t.string :date
t.timestamps null: false
belongs_to :monitors
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment