Skip to content

Commit

Permalink
Merge pull request #172 from laravel-enso/upgrade/laravel8
Browse files Browse the repository at this point in the history
Upgrade/laravel8
  • Loading branch information
gandesc committed Oct 12, 2020
2 parents 62cd748 + b272de2 commit 186ed57
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public function up()
{
Schema::create('failed_jobs', function (Blueprint $table) {
$table->id();

$table->string('uuid')->unique();
$table->text('connection');
$table->text('queue');
$table->longText('payload');
Expand Down
22 changes: 22 additions & 0 deletions src/Upgrades/FailedJobs.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

namespace LaravelEnso\Core\Upgrades;

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use LaravelEnso\Upgrade\Contracts\MigratesTable;

class FailedJobs implements MigratesTable
{
public function isMigrated(): bool
{
return Schema::hasColumn('failed_jobs', 'uuid');
}

public function migrateTable(): void
{
Schema::table('failed_jobs', function (Blueprint $table) {
$table->string('uuid')->after('id')->nullable()->unique();
});
}
}

0 comments on commit 186ed57

Please sign in to comment.