mirror of
				https://github.com/fspc/BikeShed-1.git
				synced 2025-10-31 00:45:35 -04:00 
			
		
		
		
	
		
			
				
	
	
		
			18 lines
		
	
	
		
			469 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			469 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| class CreateTeams < ActiveRecord::Migration
 | |
|   def up
 | |
|     create_table :teams do |t|
 | |
|       t.string :name, :null => false, :default => ''
 | |
|       t.integer :max_members, :null => false, :default => 16
 | |
|       t.integer :captain_id, :null => false
 | |
|     end
 | |
|     add_index :teams, :name, :unique => true
 | |
|     add_index :teams, :captain_id
 | |
|   end
 | |
| 
 | |
|   def down
 | |
|     remove_index :teams, :column => :captain_id
 | |
|     remove_index :teams, :column => :name
 | |
|     drop_table :teams
 | |
|   end
 | |
| end
 |