diff --git a/database/migrations/2024_03_11_221942_create_pedidos_table.php b/database/migrations/2024_03_11_221942_create_pedidos_table.php index 82de4d1..f8cd7c1 100644 --- a/database/migrations/2024_03_11_221942_create_pedidos_table.php +++ b/database/migrations/2024_03_11_221942_create_pedidos_table.php @@ -18,6 +18,7 @@ public function up(): void $table->unsignedBigInteger('barrio_id'); $table->timestamps(); $table->foreign('barrio_id')->references('id')->on('barrios'); + $table->unique(['barrio_id','name']); }); }