engine = 'InnoDB'; $table->bigIncrements('id')->unsigned(); $table->date('date'); $table->bigInteger('clients_id')->unsigned(); $table->json("adresse")->default(new Expression('(JSON_OBJECT())')); $table->timestamps(); $table->index("date"); $table->index("clients_id"); }); Schema::table('commandes', function (Blueprint $table){ $table->foreign('clients_id')->references('id')->on('clients')->onUpdate('cascade')->onDelete('cascade'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('commandes'); } };