osb/database/migrations/2019_01_24_142111_create_jobs_table.php

33 lines
814 B
PHP
Raw Normal View History

2024-06-21 07:43:32 +00:00
<?php
use Illuminate\Database\Migrations\Migration;
2024-07-07 12:09:15 +00:00
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
2024-06-21 07:43:32 +00:00
2024-07-07 12:09:15 +00:00
return new class extends Migration
2024-06-21 07:43:32 +00:00
{
/**
* Run the migrations.
*/
2024-07-07 12:09:15 +00:00
public function up(): void
2024-06-21 07:43:32 +00:00
{
Schema::create('jobs', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('queue')->index();
$table->longText('payload');
$table->unsignedTinyInteger('attempts');
$table->unsignedInteger('reserved_at')->nullable();
$table->unsignedInteger('available_at');
$table->unsignedInteger('created_at');
});
}
/**
* Reverse the migrations.
*/
2024-07-07 12:09:15 +00:00
public function down(): void
2024-06-21 07:43:32 +00:00
{
Schema::dropIfExists('jobs');
}
2024-07-07 12:09:15 +00:00
};