Sha256: a7613c3f21885411b97bc84f44d0a4df4f4e9437901b4fa13cb108f35393441f
Contents?: true
Size: 491 Bytes
Versions: 9
Compression:
Stored size: 491 Bytes
Contents
# This migration comes from spree (originally 20130414000512) class UpdateNameFieldsOnSpreeCreditCards < ActiveRecord::Migration[4.2] def up if ApplicationRecord.connection.adapter_name.downcase.include? "mysql" execute "UPDATE spree_credit_cards SET name = CONCAT(first_name, ' ', last_name)" else execute "UPDATE spree_credit_cards SET name = first_name || ' ' || last_name" end end def down execute "UPDATE spree_credit_cards SET name = NULL" end end
Version data entries
9 entries across 9 versions & 2 rubygems