我在 Laravel 遷移中創(chuàng)建了一個消息表,但它也在創(chuàng)建另一個表create_failed_jobs_table。我沒有創(chuàng)建這個,它是一個新項目。它發(fā)生在我創(chuàng)建的每個項目中,它也會自動創(chuàng)建此表,同時還創(chuàng)建另一個表,我不知道我所做的是否創(chuàng)建了它。這是這個文件:create_failed_jobs_table):<?phpuse Illuminate\Database\Migrations\Migration;use Illuminate\Database\Schema\Blueprint;use Illuminate\Support\Facades\Schema;class CreateFailedJobsTable extends Migration{ /** * Run the migrations. * * @return void */ public function up() { Schema::create('failed_jobs', function (Blueprint $table) { $table->bigIncrements('id'); $table->text('connection'); $table->text('queue'); $table->longText('payload'); $table->longText('exception'); $table->timestamp('failed_at')->useCurrent(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('failed_jobs'); }}創(chuàng)建消息表:)<?phpuse Illuminate\Database\Migrations\Migration;use Illuminate\Database\Schema\Blueprint;use Illuminate\Support\Facades\Schema;class CreateMessagesTable extends Migration{ /** * Run the migrations. * * @return void */ public function up() { Schema::create('messages', function (Blueprint $table) { $table->bigIncrements('id'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('messages'); }}
1 回答

呼喚遠(yuǎn)方
TA貢獻(xiàn)1856條經(jīng)驗 獲得超11個贊
要回答您的問題,以便您的問題可以標(biāo)記為已回答:該failed_jobs
表是所有 Laravel 6.x 項目的默認(rèn)設(shè)置。您可以查看發(fā)行說明以了解 6.0 版中更改的其他內(nèi)容。
請注意,Laravel 6.0 還在配置中添加了一個新的驅(qū)動程序選項。這可能就是他們默認(rèn)包含遷移的原因。
- 1 回答
- 0 關(guān)注
- 168 瀏覽
添加回答
舉報
0/150
提交
取消