eliminada columna para total

This commit is contained in:
Alejandro Tasistro 2024-03-19 15:40:53 -03:00
parent a569a2a497
commit 76199273c9

View file

@ -24,11 +24,10 @@ return new class extends Migration
$table->foreign('barrio_id')->references('id')->on('barrios'); $table->foreign('barrio_id')->references('id')->on('barrios');
}); });
Schema::create('producto_pedido', function (Blueprint $table) { Schema::create('pedido_producto', function (Blueprint $table) {
$table->unsignedBigInteger('pedido_id'); $table->unsignedBigInteger('pedido_id');
$table->unsignedBigInteger('producto_id'); $table->unsignedBigInteger('producto_id');
$table->unsignedInteger('cantidad'); $table->unsignedInteger('cantidad');
$table->unsignedDecimal('total', 15, 8);
$table->timestamps(); $table->timestamps();
$table->primary(['pedido_id','producto_id']); $table->primary(['pedido_id','producto_id']);
$table->foreign('pedido_id')->references('id')->on('pedidos'); $table->foreign('pedido_id')->references('id')->on('pedidos');
@ -41,7 +40,7 @@ return new class extends Migration
*/ */
public function down(): void public function down(): void
{ {
Schema::dropIfExists('producto_pedido'); Schema::dropIfExists('pedido_producto');
Schema::dropIfExists('productos'); Schema::dropIfExists('productos');
} }
}; };