diff --git a/database/migrations/2024_05_07_111420_create_student_subject_table.php b/database/migrations/2024_05_07_111420_create_student_subject_table.php new file mode 100644 index 0000000..662294e --- /dev/null +++ b/database/migrations/2024_05_07_111420_create_student_subject_table.php @@ -0,0 +1,29 @@ +foreignId('student_id')->constrained('students')->onDelete('cascade'); + $table->foreignId('subject_id')->constrained('subjects')->onDelete('cascade'); + $table->unsignedInteger('score'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('student_subject'); + } +};