prod #7

Merged
klllst merged 40 commits from feature/task-7 into master 2024-06-16 12:25:52 +04:00
2 changed files with 5 additions and 2 deletions
Showing only changes of commit 1a0cf48515 - Show all commits

View File

@ -15,7 +15,10 @@ return new class extends Migration
$table->id(); $table->id();
$table->string('name'); $table->string('name');
$table->string('type'); $table->string('type');
$table->date('lesson_date')->nullable(); $table->date('lesson_date');
$table->foreignId('grade_id')->constrained('grades')->onDelete('cascade');
$table->foreignId('subject_id')->constrained('subjects')->onDelete('cascade');
$table->foreignId('teacher_id')->constrained('teachers')->onDelete('cascade');
$table->timestamps(); $table->timestamps();
}); });
} }

View File

@ -12,7 +12,7 @@ return new class extends Migration
public function up(): void public function up(): void
{ {
Schema::table('student_subject', function (Blueprint $table) { Schema::table('student_subject', function (Blueprint $table) {
$table->foreignId('lesson_id')->constrained('lessons')->onDelete('cascade'); $table->foreignId('lesson_id')->nullable()->constrained('lessons')->onDelete('cascade');
}); });
} }