unsignedBigInteger('professor_id'); $table->char('semester_code', 3); $table->decimal('admin_load')->nullable(); $table->decimal('investigative_load')->nullable(); $table->foreign('professor_id')->references('id')->on('professors'); $table->foreign('semester_code')->references('code')->on('semesters'); $table->unique(['professor_id', 'semester_code']); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('professor_semester'); } }