bigIncrements('id'); $table->bigInteger('booking_id')->nullable(); $table->string('participant_name', 255)->nullable(); $table->string('participant_firstname', 255)->nullable(); $table->date('participant_birthdate')->nullable(); $table->bigInteger('participant_salutation_id')->nullable(); $table->tinyInteger('participant_child')->nullable()->default(0); $table->index('booking_id', 'participant_booking_id_idx'); $table->index('participant_salutation_id', 'participant_participant_salutation_id_idx'); $table->foreign('booking_id', 'participant_booking_id_booking_id')->references('id')->on('booking')->onDelete('CASCADE ')->onUpdate('RESTRICT'); $table->foreign('participant_salutation_id', 'participant_participant_salutation_id_salutation_id')->references('id')->on('salutation')->onDelete('RESTRICT ')->onUpdate('RESTRICT'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('participant'); } }