id(); $table->unsignedBigInteger('user_id')->nullable(); $table->unsignedBigInteger('course_id')->nullable(); $table->string('identifier')->unique(); $table->timestamps(); $table->index('user_id'); $table->index('course_id'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('certificates'); } };