id(); $table->foreignId('user_id')->nullable()->constrained()->nullOnDelete(); $table->string('name'); $table->text('description')->nullable(); $table->text('introduction')->nullable(); $table->boolean('is_system')->default(false); $table->boolean('is_active')->default(true); $table->timestamps(); $table->index(['user_id', 'is_system']); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('subjects'); } };