class CreateFertilizerCompositions < ActiveRecord::Migration[8.0] def change create_table :fertilizer_compositions do |t| t.references :fertilizer_product, null: false, foreign_key: true t.references :fertilizer_component, null: false, foreign_key: true t.decimal :percent_w, precision: 6, scale: 3, null: false # e.g. 13.500 (% w/w) t.timestamps end end end