Path: blob/1.0-develop/database/migrations/2016_09_04_171338_update_jobs_tables.php
7460 views
<?php12use Illuminate\Support\Facades\Schema;3use Illuminate\Database\Schema\Blueprint;4use Illuminate\Database\Migrations\Migration;56class UpdateJobsTables extends Migration7{8/**9* Run the migrations.10*/11public function up(): void12{13Schema::table('jobs', function (Blueprint $table) {14$table->dropIndex(['queue', 'reserved', 'reserved_at']);15$table->dropColumn('reserved');1617$table->index(['queue', 'reserved_at']);18});19}2021/**22* Reverse the migrations.23*/24public function down(): void25{26Schema::table('jobs', function (Blueprint $table) {27$table->dropIndex(['queue', 'reserved_at']);2829$table->tinyInteger('reserved')->unsigned();30$table->index(['queue', 'reserved', 'reserved_at']);31});32}33}343536