移除原有的 task

This commit is contained in:
iVampireSP.com 2022-08-27 16:54:44 +08:00
parent fb54290491
commit cfda7c9be7
No known key found for this signature in database
GPG Key ID: 2F7B001CA27A8132
2 changed files with 0 additions and 52 deletions

View File

@ -1,52 +0,0 @@
<?php
use App\Models\Module\ProviderModule;
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('tasks', function (Blueprint $table) {
$table->id();
$table->string('title');
// progress (max 100)
$table->integer('progress')->default(0);
// status
$table->enum('status', ['pending', 'done', 'success', 'failed', 'error', 'cancelled', 'processing', 'need_operation'])->index();
// user id
$table->unsignedBigInteger('user_id')->index();
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
$table->string('module_id')->index();
$table->foreign('module_id')->references('id')->on('modules')->onDelete('cascade');
// host id
$table->unsignedBigInteger('host_id')->index();
$table->foreign('host_id')->references('id')->on('hosts')->onDelete('cascade');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('tasks');
}
};