Add student achievements module and improve student admin workflows

This commit is contained in:
2026-04-13 06:50:37 +00:00
parent b29c591285
commit fb904f9389
21 changed files with 1111 additions and 180 deletions
@@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::create('student_achievements', function (Blueprint $table) {
$table->id();
$table->foreignId('student_id')->constrained()->cascadeOnDelete()->cascadeOnUpdate();
$table->string('achievement_name', 150);
$table->string('category', 100)->nullable();
$table->string('level', 50)->nullable();
$table->string('organizer', 150)->nullable();
$table->string('rank', 100)->nullable();
$table->date('achievement_date')->nullable();
$table->year('achievement_year')->nullable();
$table->text('description')->nullable();
$table->string('certificate_file', 255)->nullable();
$table->timestamps();
$table->index(['student_id', 'achievement_year']);
});
}
public function down(): void
{
Schema::dropIfExists('student_achievements');
}
};
@@ -0,0 +1,22 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::table('student_achievements', function (Blueprint $table) {
$table->string('activity_photo', 255)->nullable()->after('certificate_file');
});
}
public function down(): void
{
Schema::table('student_achievements', function (Blueprint $table) {
$table->dropColumn('activity_photo');
});
}
};