mirror of
				https://github.com/fspc/BikeShed-1.git
				synced 2025-11-03 17:15:34 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			18 lines
		
	
	
		
			471 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			471 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
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
 |