Sha256: 7483d1bb6ec5e39eda27747518859454ac7dc55d0ce4563bfb4f3cd63f783dca
Contents?: true
Size: 599 Bytes
Versions: 21
Compression:
Stored size: 599 Bytes
Contents
class CreateStoreCreditTypes < ActiveRecord::Migration[4.2] def change create_table :spree_store_credit_types do |t| t.string :name t.integer :priority t.timestamps null: true end add_column :spree_store_credits, :type_id, :integer add_index :spree_store_credits, :type_id add_index :spree_store_credit_types, :priority Spree::StoreCreditType.create_with(priority: 1).find_or_create_by!(name: Spree.t("store_credit.expiring")) Spree::StoreCreditType.create_with(priority: 2).find_or_create_by!(name: Spree.t("store_credit.non_expiring")) end end
Version data entries
21 entries across 21 versions & 1 rubygems