nueva tabla pendientes

This commit is contained in:
Felipe
2023-10-17 15:38:54 -05:00
parent 0c15e3c3b0
commit c7ba02a974
5 changed files with 296 additions and 186 deletions
@@ -0,0 +1,37 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('pendientes', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('historial_id')->nullable();;
$table->unsignedBigInteger('servicio_id')->nullable();;
$table->string('cantidad')->nullable();
$table->string('estado')->nullable();
$table->foreign('historial_id')->references('id')->on('historiales')->onDelete('cascade');
$table->foreign('servicio_id')->references('id')->on('servicios')->onUpdate('cascade');;
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('pendientes');
}
};