Second part of admin-namespace-reorder. Also renamed OrderGroup into Ordergroup. More view-sharing between groups is neccessary.
This commit is contained in:
parent
2d5dc03b90
commit
fadc951208
83 changed files with 410 additions and 518 deletions
15
db/migrate/20090114101610_rename_ordergroups.rb
Normal file
15
db/migrate/20090114101610_rename_ordergroups.rb
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue