Missed migrations from previous commit

This commit is contained in:
Deon George 2019-11-10 12:11:45 +11:00
parent db0d0278ed
commit 135bf16879
2 changed files with 5 additions and 39 deletions

View File

@ -1,33 +0,0 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateFailedJobsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('failed_jobs', function (Blueprint $table) {
$table->increments('id');
$table->text('connection');
$table->text('queue');
$table->longText('payload');
$table->timestamp('failed_at')->useCurrent();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('failed_jobs');
}
}

View File

@ -1,7 +1,8 @@
<?php <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateJobsTable extends Migration class CreateJobsTable extends Migration
{ {
@ -14,14 +15,12 @@ class CreateJobsTable extends Migration
{ {
Schema::create('jobs', function (Blueprint $table) { Schema::create('jobs', function (Blueprint $table) {
$table->bigIncrements('id'); $table->bigIncrements('id');
$table->string('queue'); $table->string('queue')->index();
$table->longText('payload'); $table->longText('payload');
$table->tinyInteger('attempts')->unsigned(); $table->unsignedTinyInteger('attempts');
$table->tinyInteger('reserved')->unsigned();
$table->unsignedInteger('reserved_at')->nullable(); $table->unsignedInteger('reserved_at')->nullable();
$table->unsignedInteger('available_at'); $table->unsignedInteger('available_at');
$table->unsignedInteger('created_at'); $table->unsignedInteger('created_at');
$table->index(['queue', 'reserved', 'reserved_at']);
}); });
} }
@ -32,6 +31,6 @@ class CreateJobsTable extends Migration
*/ */
public function down() public function down()
{ {
Schema::drop('jobs'); Schema::dropIfExists('jobs');
} }
} }