1
1
mirror of https://github.com/pterodactyl/panel.git synced 2024-10-27 04:12:28 +01:00

Add two migrations to handle a jobs driver change for databases in 5.3

This commit is contained in:
Dane Everitt 2016-09-04 17:21:41 -04:00
parent 193acaa6ea
commit 0deb262c56
2 changed files with 68 additions and 0 deletions

View File

@ -0,0 +1,36 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class UpdateJobsTables extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('jobs', function (Blueprint $table) {
$table->dropIndex('jobs_queue_reserved_reserved_at_index');
$table->dropColumn('reserved');
$table->index(['queue', 'reserved_at']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('jobs', function (Blueprint $table) {
$table->dropIndex('jobs_queue_reserved_at_index');
$table->tinyInteger('reserved')->unsigned();
$table->index(['queue', 'reserved', 'reserved_at']);
});
}
}

View File

@ -0,0 +1,32 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class UpdateFailedJobsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('failed_jobs', function (Blueprint $table) {
$table->text('exception');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('failed_jobs', function (Blueprint $table) {
$table->dropColumn('exception');
});
}
}