Second part of admin-namespace-reorder. Also renamed OrderGroup into Ordergroup. More view-sharing between groups is neccessary.

This commit is contained in:
Benjamin Meichsner 2009-01-14 12:46:01 +01:00
parent 2d5dc03b90
commit fadc951208
83 changed files with 410 additions and 518 deletions

View file

@ -0,0 +1,15 @@
class RenameOrdergroups < ActiveRecord::Migration
def self.up
rename_column :financial_transactions, :order_group_id, :ordergroup_id
rename_column :group_orders, :order_group_id, :ordergroup_id
remove_index :group_orders, :name => "index_group_orders_on_order_group_id_and_order_id"
add_index :group_orders, [:ordergroup_id, :order_id], :unique => true
Group.find(:all, :conditions => { :type => "OrderGroup" }).each do |ordergroup|
ordergroup.update_attribute(:type, "Ordergroup")
end
end
def self.down
end
end