redz1029 e2ff0140ef feat(db): programmer day sheets schema, triggers, RLS
Adds migration 20260927150000_add_programmer_day_sheets.sql:
- manila_today() stable helper (Asia/Manila timezone)
- programmer_day_sheets table with draft/pending/disapproved/approved status,
  unique(programmer_id, work_date), updated_at trigger, RLS
- programmer_day_sheet_events table with kind/body checks, cascade FK, RLS
- work_date column on programmer_task_work_logs (add, backfill, default, not null)
- ensure_day_sheet() SECURITY DEFINER; revoked from public/anon/authenticated
- BEFORE INSERT trigger validate_work_log_date (work_date_locked error code)
- AFTER INSERT trigger on work_logs → ensure_day_sheet
- AFTER INSERT trigger on activity_logs → ensure_day_sheet for assignee
- RLS SELECT policies (own sheet or admin; events through parent sheet)
- notifications.day_sheet_id FK column + partial index
- Add day sheets tables to supabase_realtime publication

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-09-27 22:51:41 +08:00
2026-05-03 15:00:35 +08:00
2026-04-27 06:20:39 +08:00
2026-04-09 19:01:53 +08:00
2026-04-09 19:01:53 +08:00
2026-04-09 19:01:53 +08:00
2026-04-27 06:20:39 +08:00
2026-04-09 19:01:53 +08:00
2026-02-09 20:10:42 +08:00
2026-04-09 19:01:53 +08:00
2026-04-09 19:01:53 +08:00
2026-04-27 06:20:39 +08:00
2026-04-09 19:01:53 +08:00
2026-04-09 19:01:53 +08:00
2026-04-09 19:01:53 +08:00
2026-02-09 20:10:42 +08:00
2026-04-09 19:01:53 +08:00
2026-04-09 19:01:53 +08:00
S
Description
No description provided
Readme 275 MiB
Languages
Dart 80.1%
JavaScript 5.8%
PLpgSQL 5.5%
Shell 3.4%
HTML 3%
Other 1.9%