initial commit

This commit is contained in:
2026-06-13 13:18:32 +07:00
commit 5d20c793eb
59 changed files with 6179 additions and 0 deletions
@@ -0,0 +1,12 @@
-- Migration: Add bantuan_terakhir column to lokasi and populate from last_assisted_at
-- Idempotent statements for MySQL
ALTER TABLE lokasi ADD COLUMN IF NOT EXISTS bantuan_terakhir DATETIME NULL;
-- Populate bantuan_terakhir for records that already have last_assisted_at
UPDATE lokasi
SET bantuan_terakhir = last_assisted_at
WHERE bantuan_terakhir IS NULL AND last_assisted_at IS NOT NULL;
-- Add index on assisted for performance (ignore error if exists)
CREATE INDEX idx_lokasi_assisted ON lokasi (assisted);