add assessment feature
This commit is contained in:
+32
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Database\Migrations;
|
||||
|
||||
use CodeIgniter\Database\Migration;
|
||||
|
||||
class AddEducationCommitteeNoteToStudentAssessments extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
if (! $this->db->tableExists('student_assessments')
|
||||
|| $this->db->fieldExists('education_committee_note', 'student_assessments')) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->forge->addColumn('student_assessments', [
|
||||
'education_committee_note' => [
|
||||
'type' => 'TEXT',
|
||||
'null' => true,
|
||||
'after' => 'score',
|
||||
],
|
||||
]);
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
if ($this->db->tableExists('student_assessments')
|
||||
&& $this->db->fieldExists('education_committee_note', 'student_assessments')) {
|
||||
$this->forge->dropColumn('student_assessments', 'education_committee_note');
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user