changed migrations
This commit is contained in:
parent
7a80e52d3c
commit
1a0cf48515
@ -15,7 +15,10 @@ return new class extends Migration
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$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();
|
||||
});
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ return new class extends Migration
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('student_subject', function (Blueprint $table) {
|
||||
$table->foreignId('lesson_id')->constrained('lessons')->onDelete('cascade');
|
||||
$table->foreignId('lesson_id')->nullable()->constrained('lessons')->onDelete('cascade');
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user