Sha256: 234cc2ac9cabee6ce5afd32f36e2d4f525bd108b46746f8ead522b81916d2320
Contents?: true
Size: 1.38 KB
Versions: 5
Compression:
Stored size: 1.38 KB
Contents
class AddConditionJoinTables < ActiveRecord::Migration[7.0] def change create_table :solidus_promotions_condition_products, force: :cascade do |t| t.references :product, type: :integer, index: true, null: false, foreign_key: { to_table: :spree_products } t.references :condition, index: true, null: false, foreign_key: { to_table: :solidus_promotions_conditions } t.timestamps end create_table :solidus_promotions_condition_taxons, force: :cascade do |t| t.references :taxon, type: :integer, index: true, null: false, foreign_key: { to_table: :spree_taxons } t.references :condition, index: true, null: false, foreign_key: { to_table: :solidus_promotions_conditions } t.timestamps end create_table :solidus_promotions_condition_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 :condition, index: true, null: false, foreign_key: { to_table: :solidus_promotions_conditions } t.timestamps end create_table :solidus_promotions_condition_stores do |t| t.references :store, type: :integer, index: true, null: false, foreign_key: { to_table: :spree_stores } t.references :condition, index: true, null: false, foreign_key: { to_table: :solidus_promotions_conditions } t.timestamps end end end
Version data entries
5 entries across 5 versions & 1 rubygems