init backend presensi

This commit is contained in:
mwpn
2026-03-05 14:37:36 +07:00
commit b4fda6b9c9
319 changed files with 27261 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
<?php
namespace App\Database\Migrations;
use CodeIgniter\Database\Migration;
class AddTeacherUserIdToSchedulesTable extends Migration
{
public function up()
{
$this->forge->addColumn('schedules', [
'teacher_user_id' => [
'type' => 'INT',
'constraint' => 11,
'unsigned' => true,
'null' => true,
'after' => 'teacher_name',
],
]);
$this->forge->addForeignKey('teacher_user_id', 'users', 'id', 'SET NULL', 'CASCADE', 'schedules_teacher_user_id_fk');
}
public function down()
{
$this->forge->dropForeignKey('schedules', 'schedules_teacher_user_id_fk');
$this->forge->dropColumn('schedules', 'teacher_user_id');
}
}