1. 05 Jun, 2026 8 commits
  2. 04 Jun, 2026 2 commits
  3. 03 Jun, 2026 4 commits
  4. 02 Jun, 2026 5 commits
  5. 01 Jun, 2026 6 commits
  6. 31 May, 2026 2 commits
  7. 30 May, 2026 2 commits
    • fix(model): correct idx_created_at_id index column order to (created_at, id) (#5191) · afb470e4
      The idx_created_at_id composite index on the logs table was defined as
      (id, created_at) because the GORM `priority` values on Id and CreatedAt were
      swapped. Since `id` is the auto-increment primary key, a secondary composite
      index leading with `id` is redundant with the PK and cannot accelerate
      `created_at` range scans (a range column must sit at the index prefix).
      
      This defeats the common log-listing queries
      (`WHERE created_at BETWEEN ? AND ? ORDER BY id DESC LIMIT n` in
      GetAllLogs/GetUserLogs) that the index name implies it should serve — the
      optimizer falls back to scanning the primary key, degrading to near full-table
      scans on large logs tables.
      
      Swap the priorities so the column order becomes (created_at, id), matching the
      index name and its intended purpose. idx_user_id_id and idx_created_at_type are
      unaffected.
      
      Note: GORM AutoMigrate does not change the column order of an already-existing
      index with the same name, so existing deployments must rebuild the index
      manually (see PR description for per-database DDL).
      
      Co-authored-by: wuyupeng <wuyupeng@floatmiracle.com>
      Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
      YuPeng Wu committed
  8. 29 May, 2026 2 commits
  9. 28 May, 2026 4 commits
  10. 27 May, 2026 1 commit
  11. 26 May, 2026 4 commits