summaryrefslogtreecommitdiff
path: root/db/migrate/20230314020111_create_products.rb
blob: f28e9d16583f3d588f7196b83d25a8991afffef6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
class CreateProducts < ActiveRecord::Migration[7.0]
  def change
    create_table :products do |t|
      t.string :public_id
      t.string :name
      t.float :unitary_price
      t.float :bulk_price
      t.references :company, null: false, foreign_key: true
      t.integer :available_quantity
      t.text :categories

      t.timestamps
    end
  end
end