Sederhanakan ambang SP: hapus kolom max_points
- max_points tidak pernah dipakai logika penerbitan SP (trigger hanya baca min_points: level dgn ambang tertinggi <= total poin siswa) - Migrasi drop kolom; model, MasterDataController, ResetController (seeder) dibersihkan; form Ambang SP & form tambah cukup satu angka (Min Poin) - Dashboard Ambang SP: batas atas level dihitung dari min_points level berikutnya (level terakhir = tak terbatas), urutan dijamin orderBy min_points - Test: 29 passed / 99 assertion
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* max_points tidak pernah dipakai dalam logika penerbitan SP
|
||||
* (trigger hanya membaca min_points). Hapus agar desain simpel.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('sp_thresholds', function (Blueprint $table) {
|
||||
$table->dropColumn('max_points');
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('sp_thresholds', function (Blueprint $table) {
|
||||
$table->integer('max_points')->nullable()->after('min_points');
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user