recreate project

This commit is contained in:
root
2026-02-10 22:11:06 -05:00
commit 663c0cdbda
10149 changed files with 1379710 additions and 0 deletions
@@ -0,0 +1,38 @@
<?php
namespace App\Database\Migrations;
use CodeIgniter\Database\Migration;
class AddEventOnlyToStudentClass extends Migration
{
public function up()
{
if (!$this->db->tableExists('student_class')) {
return;
}
$fields = $this->db->getFieldNames('student_class');
if (in_array('is_event_only', $fields, true)) {
return;
}
$this->forge->addColumn('student_class', [
'is_event_only' => ['type' => 'TINYINT', 'constraint' => 1, 'unsigned' => true, 'default' => 0],
]);
}
public function down()
{
if (!$this->db->tableExists('student_class')) {
return;
}
$fields = $this->db->getFieldNames('student_class');
if (!in_array('is_event_only', $fields, true)) {
return;
}
$this->forge->dropColumn('student_class', 'is_event_only');
}
}