Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pterodactyl
GitHub Repository: pterodactyl/panel
Path: blob/1.0-develop/database/migrations/2016_01_23_200440_create_jobs_table.php
7460 views
1
<?php
2
3
use Illuminate\Support\Facades\Schema;
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Database\Migrations\Migration;
6
7
class CreateJobsTable extends Migration
8
{
9
/**
10
* Run the migrations.
11
*/
12
public function up(): void
13
{
14
Schema::create('jobs', function (Blueprint $table) {
15
$table->bigIncrements('id');
16
$table->string('queue');
17
$table->longText('payload');
18
$table->tinyInteger('attempts')->unsigned();
19
$table->tinyInteger('reserved')->unsigned();
20
$table->unsignedInteger('reserved_at')->nullable();
21
$table->unsignedInteger('available_at');
22
$table->unsignedInteger('created_at');
23
24
$table->index(['queue', 'reserved', 'reserved_at']);
25
});
26
}
27
28
/**
29
* Reverse the migrations.
30
*/
31
public function down(): void
32
{
33
Schema::dropIfExists('jobs');
34
}
35
}
36
37