From bc7a27534c2f83f178ef08ed50963faeefbb7654 Mon Sep 17 00:00:00 2001 From: Alexis Gousseau Date: Wed, 30 Nov 2022 11:03:47 +0100 Subject: [PATCH] add products-subranges relation --- database/migrations/2022_11_29_153216_create_products_table.php | 1 + 1 file changed, 1 insertion(+) diff --git a/database/migrations/2022_11_29_153216_create_products_table.php b/database/migrations/2022_11_29_153216_create_products_table.php index 54dc1c7..73df1f0 100644 --- a/database/migrations/2022_11_29_153216_create_products_table.php +++ b/database/migrations/2022_11_29_153216_create_products_table.php @@ -31,6 +31,7 @@ class CreateProductsTable extends Migration $table->boolean('is_vip')->comment('Est un produit vip ou non'); $table->boolean('is_egalim')->comment('Est un produit egalim ou non'); $table->boolean('status')->comment('Est un produit publiƩ ou non'); + $table->foreignId('subrange_id')->references('id')->on('subranges'); $table->timestamps(); }); }