Sha256: 5ba85b1f4c7706b16d2a261a0eefa4baa33ddefc3d40d7b68bd128407faafd25
Contents?: true
Size: 324 Bytes
Versions: 44
Compression:
Stored size: 324 Bytes
Contents
class EnsurePaymentsHaveNumbers < ActiveRecord::Migration[4.2] def change add_index :spree_payments, :number unless index_exists?(:spree_payments, :number) Spree::Payment.where(number: nil).find_each do |payment| payment.generate_number payment.update_columns(number: payment.number) end end end
Version data entries
44 entries across 44 versions & 1 rubygems