2022-07-09 03:09:04 +00:00
|
|
|
<?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('evidencias', function (Blueprint $table) {
|
|
|
|
$table->id();
|
|
|
|
$table->string('codigo', 16);
|
2022-10-10 20:31:12 +00:00
|
|
|
$table->string('denominacion', 255);
|
|
|
|
$table->string('adjunto', 255);
|
2022-07-09 03:09:04 +00:00
|
|
|
$table->foreignId('id_user')
|
2022-10-10 20:31:12 +00:00
|
|
|
->constrained('users');
|
2022-07-27 05:42:33 +00:00
|
|
|
$table->foreignId('id_plan')
|
2022-10-10 20:31:12 +00:00
|
|
|
->constrained('plans')
|
|
|
|
->onDelete('cascade');
|
2022-08-02 04:44:21 +00:00
|
|
|
$table->timestamps();
|
2022-07-09 03:09:04 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reverse the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function down()
|
|
|
|
{
|
|
|
|
Schema::dropIfExists('evidencias');
|
|
|
|
}
|
|
|
|
};
|