Sha256: 2d7685427d67531c310a288f3d110cc534d636c40247f741c04508df1e8f6446
Contents?: true
Size: 435 Bytes
Versions: 12
Compression:
Stored size: 435 Bytes
Contents
class AddTotalPaidToMembership < ActiveRecord::Migration def change add_column :memberships, :cart_price, :integer add_column :memberships, :total_paid, :integer add_column :memberships, :changed_membership_id, :integer, :defult => nil Membership.all.each do |membership| membership.cart_price = membership.sold_price membership.total_paid = membership.sold_price membership.save end end end
Version data entries
12 entries across 12 versions & 1 rubygems