Sha256: 633332d0a98253689353175107a134dafa06bd2de866ee638c00ffaa3e857f3f
Contents?: true
Size: 673 Bytes
Versions: 26
Compression:
Stored size: 673 Bytes
Contents
class CreateSpreeWishedProducts < ActiveRecord::Migration[5.2] def change create_table :spree_wished_products, if_not_exists: true do |t| t.references :variant t.belongs_to :wishlist t.column :quantity, :integer, default: 1, null: false t.timestamps end add_index :spree_wished_products, [:variant_id, :wishlist_id], unique: true unless index_exists?(:spree_wished_products, [:variant_id, :wishlist_id]) add_index :spree_wished_products, :variant_id unless index_exists?(:spree_wished_products, :variant_id) add_index :spree_wished_products, :wishlist_id unless index_exists?(:spree_wished_products, :wishlist_id) end end
Version data entries
26 entries across 26 versions & 1 rubygems