Path: blob/1.0-develop/database/migrations/2016_01_23_200440_create_jobs_table.php
7460 views
<?php12use Illuminate\Support\Facades\Schema;3use Illuminate\Database\Schema\Blueprint;4use Illuminate\Database\Migrations\Migration;56class CreateJobsTable extends Migration7{8/**9* Run the migrations.10*/11public function up(): void12{13Schema::create('jobs', function (Blueprint $table) {14$table->bigIncrements('id');15$table->string('queue');16$table->longText('payload');17$table->tinyInteger('attempts')->unsigned();18$table->tinyInteger('reserved')->unsigned();19$table->unsignedInteger('reserved_at')->nullable();20$table->unsignedInteger('available_at');21$table->unsignedInteger('created_at');2223$table->index(['queue', 'reserved', 'reserved_at']);24});25}2627/**28* Reverse the migrations.29*/30public function down(): void31{32Schema::dropIfExists('jobs');33}34}353637