photo/database/migrations/2019_11_10_120537_create_jobs_table.php

37 lines
860 B
PHP
Raw 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
class CreateJobsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
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
*/
public function down()
{
2019-11-10 01:11:45 +00:00
Schema::dropIfExists('jobs');
2016-06-22 21:07:44 +00:00
}
}