# Fix: SQLSTATE[01000] Error - Data Truncated for 'status_masuk' Column

## Problem
The application was throwing the following error when trying to insert attendance records with 'sakit' (sick) status:

```
SQLSTATE[01000]: Warning: 1265 Data truncated for column 'status_masuk' at row 1
```

This occurred because:
- The `status_masuk` column in the `absensi_gurus` table was defined as an ENUM with values: `['hadir', 'terlambat', 'izin', 'alpha']`
- The application code was trying to insert 'sakit' as a status value
- The migration to add 'sakit' to the ENUM existed but hadn't been run yet

## Solution
Ran the pending migration that updates the `status_masuk` column to include 'sakit':

```bash
php artisan migrate
```

The migration `2026_08_04_143000_update_absensi_gurus_add_sakit_status.php` updated the column definition to:
```php
enum('status_masuk', ['hadir', 'terlambat', 'izin', 'sakit', 'alpha'])
```

## Verification
After running the migration, the database structure was verified:

```
status_masuk: enum('hadir','terlambat','izin','sakit','alpha')
```

The 'sakit' value is now included in the allowed enum values.

## Impact
- The manual attendance form (`create-manual.blade.php`) can now successfully save records with 'sakit' status
- The AbsensiGuru model already had support for 'sakit' status with proper labels and badge classes
- The controller validation rules already included 'sakit' in the allowed values

## Date Fixed
August 4, 2026
