Sha256: 768d2250fb9bd4e6fa55c20ff3833a54ba387ca5bb04d9c3919c6b24f55d4b6f
Contents?: true
Size: 1.29 KB
Versions: 9
Compression:
Stored size: 1.29 KB
Contents
class AddRuleTables < ActiveRecord::Migration[7.0] def change create_table :friendly_products_promotion_rules, force: :cascade do |t| t.references :product, type: :integer, index: true, null: false, foreign_key: {to_table: :spree_products} t.references :promotion_rule, index: true, null: false, foreign_key: {to_table: :friendly_promotion_rules} t.timestamps end create_table :friendly_promotion_rules_taxons, force: :cascade do |t| t.references :taxon, type: :integer, index: true, null: false, foreign_key: {to_table: :spree_taxons} t.references :promotion_rule, index: true, null: false, foreign_key: {to_table: :friendly_promotion_rules} t.timestamps end create_table :friendly_promotion_rules_users, force: :cascade do |t| t.references :user, type: :integer, index: true, null: false, foreign_key: {to_table: Spree.user_class.table_name} t.references :promotion_rule, index: true, null: false, foreign_key: {to_table: :friendly_promotion_rules} t.timestamps end create_table :friendly_promotion_rules_stores do |t| t.references :store, type: :integer, index: true, null: false, foreign_key: {to_table: :spree_stores} t.references :promotion_rule, index: true, null: false t.timestamps end end end
Version data entries
9 entries across 9 versions & 1 rubygems