Creando tipo pedido ollas en la migracion

This commit is contained in:
Alejandro Tasistro 2025-07-08 21:20:11 -03:00
parent e9a6def7c1
commit 7a7cd678ad

View file

@ -21,6 +21,7 @@ class CreateTipoPedidosTable extends Migration
});
$hogar = TipoPedido::firstOrCreate(['nombre' => 'hogar']);
TipoPedido::firstOrCreate(['nombre' => 'olla']);
Schema::table('subpedidos', function (Blueprint $table) use ($hogar) {
$table->foreignId('tipo_pedido_id')->default($hogar->id);