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,41 @@
<?php
namespace App\Database\Migrations;
use CodeIgniter\Database\Migration;
class AddNoSchoolToCalendarEvents extends Migration
{
public function up()
{
$db = \Config\Database::connect();
$cols = [];
try {
$cols = $db->getFieldNames('calendar_events');
} catch (\Throwable $e) {
$cols = [];
}
if (!in_array('no_school', $cols, true)) {
$this->forge->addColumn('calendar_events', [
'no_school' => [
'type' => 'TINYINT',
'constraint' => 1,
'null' => false,
'default' => 0,
'after' => 'notify_teacher',
],
]);
}
}
public function down()
{
try {
$this->forge->dropColumn('calendar_events', 'no_school');
} catch (\Throwable $e) {
// ignore
}
}
}