Feat: Responses form
This commit is contained in:
@@ -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');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user