You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.1 KiB
PHP
40 lines
1.1 KiB
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
class CreateJobsTable extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('jobs', function (Blueprint $table) {
|
|
$table->unsignedInteger('id', true)->comment('고유번호');
|
|
$table->string('queue', 255)->comment('queue');
|
|
$table->longText('payload')->comment('payload');
|
|
$table->unsignedTinyInteger('attempts')->comment('시도횟수');
|
|
$table->unsignedInteger('reserved_at')->nullable()->comment('예약일');
|
|
$table->unsignedInteger('available_at')->nullable()->comment('가능일');
|
|
$table->unsignedInteger('created_at')->nullable()->comment('등록일');
|
|
|
|
// 인덱스
|
|
$table->index('queue', 'ik_tbl__jobs_queue');
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::drop('jobs');
|
|
}
|
|
}
|