Sha256: 40155f217d8f4d01f60820dcdd377a78752d4e3cedae42762cabf46eddf1590e
Contents?: true
Size: 622 Bytes
Versions: 20
Compression:
Stored size: 622 Bytes
Contents
class MoveCustomerProfileId < ActiveRecord::Migration def self.up add_column :users, :customer_profile_id, :string, :limit => 512 BillingInformation.all.each do |bi| bi.billable.update_attribute(:customer_profile_id, bi.customer_profile_id) end remove_column :billing_informations, :customer_profile_id end def self.down add_column :billing_informations, :customer_profile_id, :string, :limit => 512 BillingInformation.all.each do |bi| bi.update_attribute(:customer_profile_id, bi.billable.customer_profile_id) end remove_column :users, :customer_profile_id end end
Version data entries
20 entries across 10 versions & 1 rubygems