Sha256: 26f06980dd5c98dc56748268ed38f6cc2a5a7d8a248d3791c1eb4c5815f06008
Contents?: true
Size: 1.24 KB
Versions: 6
Compression:
Stored size: 1.24 KB
Contents
class CreateComeeCoreClientPrices < ActiveRecord::Migration[7.0] def change create_table :comee_core_client_prices do |t| t.date :valid_from, null: false t.date :valid_to, null: false t.float :price, null: false t.float :status, null: false, default: 0 t.integer :discount, null: false t.references :product, null: false, index: {name: "product_on_cccp_indx"}, foreign_key: {to_table: :comee_core_products} t.references :client, null: false, index: {name: "client_on_cccp_indx"}, foreign_key: {to_table: :comee_core_clients} t.references :unit, null: false, index: {name: "unit_on_cccp_indx"}, foreign_key: {to_table: :comee_core_units} t.references :previous_price, null: true, index: {name: "previous_price_on_cccp_indx"}, foreign_key: {to_table: :comee_core_client_prices} t.timestamps end add_index :comee_core_client_prices, %i[product_id client_id previous_price_id], unique: true, name: "pi_ci_ppi_on_cccp_indx" end end
Version data entries
6 entries across 6 versions & 1 rubygems