diff options
author | HombreLaser <sebastian-440@live.com> | 2023-03-13 20:03:06 -0600 |
---|---|---|
committer | HombreLaser <sebastian-440@live.com> | 2023-03-13 20:03:06 -0600 |
commit | 88584b5500873b7578410e0826fbd185544b19cb (patch) | |
tree | 84e87a4b0c43b7eba79edcdf67a0c962c8e0d071 /db/migrate/20230314020111_create_products.rb | |
parent | 5c899df07753a31543f8dad725a26ccddc44dfe2 (diff) |
Añade modelo Product
Diffstat (limited to 'db/migrate/20230314020111_create_products.rb')
-rw-r--r-- | db/migrate/20230314020111_create_products.rb | 15 |
1 files changed, 15 insertions, 0 deletions
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 |