Feat: Responses form

This commit is contained in:
Sallu9007
2025-01-26 02:13:19 +05:30
parent 7cd4a4c642
commit ec028d3f6f
4 changed files with 156 additions and 11 deletions

View File

@@ -0,0 +1,29 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateResponsesTable extends Migration
{
public function up()
{
Schema::create('responses', function (Blueprint $table) {
$table->id();
$table->string('title');
$table->string('activity_type');
$table->date('start_date');
$table->date('end_date');
$table->string('proof')->nullable();
$table->unsignedBigInteger('faculty_id'); // Ensure it is unsignedBigInteger
$table->foreign('faculty_id')->references('id')->on('users')->onDelete('cascade'); // Add the foreign key constraint
$table->timestamps();
});
}
public function down()
{
Schema::dropIfExists('responses');
}
}