id(); $table->string('name'); // `contribute` or `request`, or null for either. $table->string('kind', 20)->nullable(); $table->jsonb('subject'); $table->jsonb('body'); $table->unsignedInteger('position')->default(0); $table->timestamps(); }); Schema::create('application_replies', function (Blueprint $table): void { $table->id(); $table->foreignId('application_id')->constrained()->cascadeOnDelete(); $table->foreignId('user_id')->nullable()->constrained()->nullOnDelete(); $table->string('user_name')->nullable(); $table->string('subject'); $table->text('body'); // `mail` when this application sent it, `mailto` when it was // handed to the person's own mail program to send. $table->string('channel', 10); $table->timestamp('created_at')->useCurrent(); }); } public function down(): void { Schema::dropIfExists('application_replies'); Schema::dropIfExists('reply_templates'); } };