From 88584b5500873b7578410e0826fbd185544b19cb Mon Sep 17 00:00:00 2001 From: HombreLaser Date: Mon, 13 Mar 2023 20:03:06 -0600 Subject: AƱade modelo Product MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/migrate/20230314020111_create_products.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 db/migrate/20230314020111_create_products.rb (limited to 'db') diff --git a/db/migrate/20230314020111_create_products.rb b/db/migrate/20230314020111_create_products.rb new file mode 100644 index 0000000..f28e9d1 --- /dev/null +++ b/db/migrate/20230314020111_create_products.rb @@ -0,0 +1,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 -- cgit v1.2.3