Sha256: 1e0bdaece5846e67b47538320af5b878dcef2bbb9630ec85e69119af6dfb653f
Contents?: true
Size: 386 Bytes
Versions: 6
Compression:
Stored size: 386 Bytes
Contents
# This migration comes from spree (originally 20150309161154) 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
6 entries across 6 versions & 1 rubygems