2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-05 02:07:18 +08:00
Files
panel/database/migrations/2022_10_15_214646_create_tasks_table.php
2022-11-21 23:22:39 +08:00

37 lines
934 B
PHP

<?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('tasks', function (Blueprint $table) {
$table->id();
$table->integer('job_id')->nullable()->comment('任务ID');
$table->string('name')->comment('任务名');
$table->string('status')->default('waiting')->comment('任务状态');
$table->string('shell')->nullable()->comment('任务脚本');
$table->string('log')->nullable()->comment('任务日志目录');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('tasks');
}
};