From 8b708ab5970e028a3fcf493b779b29e04e7cf0b0 Mon Sep 17 00:00:00 2001 From: "m.zargarov" Date: Tue, 7 May 2024 15:19:07 +0400 Subject: [PATCH] Added score's migration --- ...07_111420_create_student_subject_table.php | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 database/migrations/2024_05_07_111420_create_student_subject_table.php 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'); + } +};