#168: updated migration
This commit is contained in:
parent
004c45eb28
commit
8248ab3614
|
@ -1,7 +1,17 @@
|
||||||
class DropBsIdFromBuildLists < ActiveRecord::Migration
|
class DropBsIdFromBuildLists < ActiveRecord::Migration
|
||||||
def change
|
|
||||||
remove_index :build_lists, :bs_id
|
class BuildList < ActiveRecord::Base
|
||||||
|
end
|
||||||
|
|
||||||
|
def up
|
||||||
|
remove_index :build_lists, :bs_id
|
||||||
remove_column :build_lists, :bs_id
|
remove_column :build_lists, :bs_id
|
||||||
end
|
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
|
end
|
||||||
|
|
Loading…
Reference in New Issue