我在 Laravel 迁移中创建了一个消息表,但它也在创建另一个表create_failed_jobs_table。我没有创建这个,它是一个新项目。它发生在我创建的每个项目中,它也会自动创建此表,同时还创建另一个表,我不知道我所做的是否创建了它。这是这个文件: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'); }}创建消息表:)<?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 回答
- 0 关注
- 172 浏览
添加回答
举报
0/150
提交
取消