Sha256: 820c57098eeab71458078b5d10e6998d37c6d4fc05122f749b9cf0d87068a594
Contents?: true
Size: 906 Bytes
Versions: 4
Compression:
Stored size: 906 Bytes
Contents
class CreateComeeCoreMasterPrices < ActiveRecord::Migration[7.0] def change create_table :comee_core_master_prices do |t| t.date :pp_valid_from, null: false t.date :pp_valid_to, null: false t.date :sp_valid_from, null: false t.date :sp_valid_to, null: false t.float :old_pprice, null: true t.float :new_pprice, null: false t.float :old_sprice, null: true t.float :new_sprice, null: false t.boolean :primary, null: false t.references :product, null: false, index: {name: "product_on_ccsp_indx"}, foreign_key: {to_table: :comee_core_products} t.references :supplier, null: false, index: {name: "supplier_on_ccsp_indx"}, foreign_key: {to_table: :comee_core_suppliers} t.timestamps end add_index :comee_core_master_prices, [:product_id, :supplier_id], unique: true end end
Version data entries
4 entries across 4 versions & 1 rubygems