Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pterodactyl
GitHub Repository: pterodactyl/panel
Path: blob/1.0-develop/database/migrations/2016_09_04_171338_update_jobs_tables.php
7460 views
1
<?php
2
3
use Illuminate\Support\Facades\Schema;
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Database\Migrations\Migration;
6
7
class UpdateJobsTables extends Migration
8
{
9
/**
10
* Run the migrations.
11
*/
12
public function up(): void
13
{
14
Schema::table('jobs', function (Blueprint $table) {
15
$table->dropIndex(['queue', 'reserved', 'reserved_at']);
16
$table->dropColumn('reserved');
17
18
$table->index(['queue', 'reserved_at']);
19
});
20
}
21
22
/**
23
* Reverse the migrations.
24
*/
25
public function down(): void
26
{
27
Schema::table('jobs', function (Blueprint $table) {
28
$table->dropIndex(['queue', 'reserved_at']);
29
30
$table->tinyInteger('reserved')->unsigned();
31
$table->index(['queue', 'reserved', 'reserved_at']);
32
});
33
}
34
}
35
36