Skip to content

Instantly share code, notes, and snippets.

@bbonamin
Created September 3, 2011 00:21
Show Gist options
  • Save bbonamin/1190275 to your computer and use it in GitHub Desktop.
Save bbonamin/1190275 to your computer and use it in GitHub Desktop.
Rails multiple association between two models - schema
create_table "flights", :force => true do |t|
t.date "date"
t.integer "pilot_id"
t.integer "instructor_id"
t.integer "glider_id"
t.string "type_of_flight"
t.integer "towplane_pilot_id"
t.integer "towplane_id"
t.integer "departure_airfield_id"
t.integer "arrival_airfield_id"
#...
end
create_table "people", :force => true do |t|
t.string "name"
t.string "glider_pilot_status"
t.string "glider_pilot_license"
t.boolean "is_glider_instructor"
t.boolean "is_towplane_pilot"
t.string "airplane_pilot_license"
t.boolean "is_airplane_instructor"
#...
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment