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,40 @@
<?php
namespace App\Database\Migrations;
use CodeIgniter\Database\Migration;
class AddGeoFenceToDevicesTable extends Migration
{
public function up()
{
$fields = [
'latitude' => [
'type' => 'DECIMAL',
'constraint' => '10,8',
'null' => true,
'after' => 'last_seen_at',
],
'longitude' => [
'type' => 'DECIMAL',
'constraint' => '11,8',
'null' => true,
'after' => 'latitude',
],
'radius_meters' => [
'type' => 'INT',
'constraint' => 11,
'null' => true,
'after' => 'longitude',
],
];
$this->forge->addColumn('devices', $fields);
}
public function down()
{
$this->forge->dropColumn('devices', ['latitude', 'longitude', 'radius_meters']);
}
}