6. What is a social network? http://www.flickr.com/photos/vj_pdx/144902289/
7.
8.
9.
10.
11.
12.
13.
14.
15. Home Cookin' - Example Relationship Text create_table :connections do | t | t.integer :person_id t.integer :contact_id t.integer :status t.timestamp :accepted_at t.timestamps end Insoshi's connections migrations:
16. Home Cookin' - Example Relationship create_table :friendships do | t | t.integer "user_id" , :null => false t.integer "friend_id" , :null => false t.datetime "created_at" t.datetime "updated_at" t.timestamps end Daniel Fischer’s “Fischy friends” example:
33. Example App - MyEventCarbon create_table "communications" , :force => true do | t | t.string "subject" t.text "content" t.integer "parent_id" t.integer "sender_id" t.integer "recipient_id" t.datetime "sender_deleted_at" t.datetime "sender_read_at" t.datetime "recipient_deleted_at" t.datetime "recipient_read_at" t.datetime "replied_at" t.string "type" t.datetime "created_at" t.datetime "updated_at" t.integer "conversation_id" end You could modify an existing model: ... but that could impact other parts of the system.
34. Example App - MyEventCarbon class CreateCarpools < ActiveRecord::Migration def self.up create_table :carpools do | t | t.integer :person_id t.integer :contact_id t.integer :event_id t.integer :status t.timestamp :accepted_at t.timestamps end A new table might be more appropriate: Duplicate the connections table, add an event_id and whatever other fields as needed.