mirror of
				https://github.com/fspc/BikeShed-1.git
				synced 2025-10-31 00:45:35 -04:00 
			
		
		
		
	
		
			
				
	
	
		
			14 lines
		
	
	
		
			355 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			355 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
| class AlterBike < ActiveRecord::Migration
 | |
|   def up
 | |
|     add_column(:bikes, :shop_id, :string)
 | |
|     add_index :bikes, :shop_id, :unique => true
 | |
|     remove_index :bikes, :column => :serial_number
 | |
|   end
 | |
| 
 | |
|   def down
 | |
|     remove_index :bikes, :column => :shop_id
 | |
|     remove_column(:bikes, :shop_id)
 | |
|     add_index :bikes, :serial_number, :unique => true
 | |
|   end
 | |
| end
 |