Files
alrahma_sunday_school/app/Database/Migrations/2026-07-30-000100_AddFallMakeupExamToSchoolYears.php
root 81a72a4c59
Tests / PHPUnit (push) Failing after 34s
fix school year and related issues
2026-07-30 00:48:54 -04:00

33 lines
840 B
PHP

<?php
namespace App\Database\Migrations;
use CodeIgniter\Database\Migration;
class AddFallMakeupExamToSchoolYears extends Migration
{
public function up(): void
{
if (! $this->db->tableExists('school_years') || $this->db->fieldExists('fall_makeup_exam_on', 'school_years')) {
return;
}
$this->forge->addColumn('school_years', [
'fall_makeup_exam_on' => [
'type' => 'DATE',
'null' => true,
'after' => 'registration_ends_on',
],
]);
}
public function down(): void
{
if (! $this->db->tableExists('school_years') || ! $this->db->fieldExists('fall_makeup_exam_on', 'school_years')) {
return;
}
$this->forge->dropColumn('school_years', 'fall_makeup_exam_on');
}
}