Velocipede's User, Sales, and Bike Inventory Web App
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

17 lines
471 B

class CreateTeamMemberships < ActiveRecord::Migration
def up
create_table :team_memberships do |t|
t.references :user, :null => false
t.references :team, :null => false
t.timestamps
end
add_index :team_memberships, :user_id
add_index :team_memberships, :team_id
end
def down
remove_index :team_memberships, :column => :team_id
remove_index :team_memberships, :column => :user_id
drop_table :team_memberships
end
end