Added Feedback section.
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('project_feedback', function (Blueprint $table) {
|
||||
$table->uuid('id')->primary();
|
||||
$table->unsignedBigInteger('project_id')->index();
|
||||
$table->foreign('project_id')->references('id')->on('projects');
|
||||
$table->unsignedBigInteger('user_id')->nullable()->index();
|
||||
$table->foreign('user_id')->references('id')->on('users');
|
||||
$table->text('name')->nullable();
|
||||
$table->text('email')->nullable();
|
||||
$table->text('message');
|
||||
$table->ipAddress('ip')->nullable();
|
||||
$table->string('user_agent')->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
$table->index(['created_at']);
|
||||
$table->index(['project_id', 'deleted_at']);
|
||||
$table->index(['user_id', 'deleted_at']);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('project_feedback');
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user