mirror of
https://gitee.com/pnoker/iot-dc3.git
synced 2026-11-03 03:32:08 +08:00
dc3_attachment.id lacked GENERATED BY DEFAULT AS IDENTITY (unlike dc3_session/dc3_message), so R2dbcAttachmentStore inserts without an id violated NOT NULL and every upload failed with HTTP 500. Add the identity clause to the canonical initdb DDL, ship idempotent migration 04 for databases initialized before the fix (with a setval guard so pre-existing explicit ids never collide), and resync the canonical fingerprint 0d9ad803... across the embedded hash and every distributed default. Co-Authored-By: Claude Code <noreply@anthropic.com>