photo/database/migrations/2019_11_10_120537_create_jobs_table.php

36 lines
867 B
PHP
Raw Permalink Normal View History

2016-06-22 21:07:44 +00:00
<?php
use Illuminate\Database\Migrations\Migration;
2019-11-10 01:11:45 +00:00
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
2016-06-22 21:07:44 +00:00
2024-08-25 08:26:29 +00:00
return new class extends Migration
2016-06-22 21:07:44 +00:00
{
/**
* Run the migrations.
*
* @return void
*/
2024-08-25 08:26:29 +00:00
public function up(): void
2016-06-22 21:07:44 +00:00
{
Schema::create('jobs', function (Blueprint $table) {
$table->bigIncrements('id');
2019-11-10 01:11:45 +00:00
$table->string('queue')->index();
2016-06-22 21:07:44 +00:00
$table->longText('payload');
2019-11-10 01:11:45 +00:00
$table->unsignedTinyInteger('attempts');
2016-06-22 21:07:44 +00:00
$table->unsignedInteger('reserved_at')->nullable();
$table->unsignedInteger('available_at');
$table->unsignedInteger('created_at');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
2024-08-25 08:26:29 +00:00
public function down(): void
2016-06-22 21:07:44 +00:00
{
2019-11-10 01:11:45 +00:00
Schema::dropIfExists('jobs');
2016-06-22 21:07:44 +00:00
}
2024-08-25 08:26:29 +00:00
};