mirror of
				https://github.com/fspc/BikeShed-1.git
				synced 2025-11-03 17:15:34 -05:00 
			
		
		
		
	Add migration to accompany 55fbd0630527761077a15988b2229a6afac548e4
This commit is contained in:
		
							parent
							
								
									55fbd06305
								
							
						
					
					
						commit
						941f7a267b
					
				
							
								
								
									
										13
									
								
								db/migrate/20130405012238_alter_bike.rb
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								db/migrate/20130405012238_alter_bike.rb
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,13 @@
 | 
			
		||||
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
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user