homeos/database
HomeOS Bootstrap ca98e21c18 fix(addons): dedup existing Ring devices before the unique index (R15)
Codex R15: on an upgrade where the pre-index race already produced duplicate
config.ring_id rows, CREATE UNIQUE INDEX would abort the migration. Now the
migration first collapses duplicates (keep the earliest id per ring_id; the
rest cascade-delete their entities/state) using portable subquery SQL that
runs on Postgres (prod) and SQLite (tests) alike.

Verified: 3 duplicates → 1 on Postgres, index then created; suite 43 green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-18 02:05:04 +02:00
..
factories Phase 1: bootstrap — Docker stack, Laravel 13, design system, auth 2026-07-17 21:06:20 +02:00
migrations fix(addons): dedup existing Ring devices before the unique index (R15) 2026-07-18 02:05:04 +02:00
seeders Fix R15: per-device MQTT ACLs, monotonic presence, real-device online semantics 2026-07-17 23:08:29 +02:00
.gitignore Phase 1: bootstrap — Docker stack, Laravel 13, design system, auth 2026-07-17 21:06:20 +02:00