#168: updated migration
This commit is contained in:
parent
004c45eb28
commit
8248ab3614
|
@ -1,7 +1,17 @@
|
|||
class DropBsIdFromBuildLists < ActiveRecord::Migration
|
||||
def change
|
||||
|
||||
class BuildList < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def up
|
||||
remove_index :build_lists, :bs_id
|
||||
remove_column :build_lists, :bs_id
|
||||
end
|
||||
|
||||
def down
|
||||
add_column :build_lists, :bs_id, :integer
|
||||
add_index :build_lists, :bs_id, :unique => true
|
||||
BuildList.update_all('bs_id = id')
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue