Sha256: a82cad66eeb0af73f8c589dbfaf4d6c7b30532931ba9adf174ccac1df953d8fe
Contents?: true
Size: 870 Bytes
Versions: 2
Compression:
Stored size: 870 Bytes
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.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 :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, [:product_id, :client_id], unique: true end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
comee_core-0.1.15 | db/migrate/20230814151601_create_comee_core_client_prices.rb |
comee_core-0.1.14 | db/migrate/20230814151601_create_comee_core_client_prices.rb |