Files
alrahma_sunday_school/app/Database/Migrations/2026-09-10-000200_AddEducationCommitteeNoteToAssessmentForms.php
T
root b5e719382d
Deploy to Shared Hosting / Shared hosting deploy (push) Failing after 49s
Tests / PHPUnit (push) Successful in 1m36s
add assessment feature
2026-09-10 06:44:24 -04:00

33 lines
885 B
PHP

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