Sha256: 205a3b2a23b0e3f384a91a4af40a81273099227e38c7dbfbd7c65be3eaf0cb37

Contents?: true

Size: 384 Bytes

Versions: 7

Compression:

Stored size: 384 Bytes

Contents

class AddStoreIdToSpreeStoreCredits < ActiveRecord::Migration[5.2]
  def change
    unless column_exists?(:spree_store_credits, :store_id)
      add_column :spree_store_credits, :store_id, :bigint
      add_index :spree_store_credits, :store_id
      Spree::StoreCredit.reset_column_information
      Spree::StoreCredit.update_all(store_id: Spree::Store.default.id)
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
spree_core-4.3.3 db/migrate/20210715091956_add_store_id_to_spree_store_credits.rb
spree_core-4.3.2 db/migrate/20210715091956_add_store_id_to_spree_store_credits.rb
spree_core-4.3.1 db/migrate/20210715091956_add_store_id_to_spree_store_credits.rb
spree_core-4.3.0 db/migrate/20210715091956_add_store_id_to_spree_store_credits.rb
spree_core-4.3.0.rc3 db/migrate/20210715091956_add_store_id_to_spree_store_credits.rb
spree_core-4.3.0.rc2 db/migrate/20210715091956_add_store_id_to_spree_store_credits.rb
spree_core-4.3.0.rc1 db/migrate/20210715091956_add_store_id_to_spree_store_credits.rb