Skip to content

Fix ID generation for Doctrine ORM 3 on PostgreSQL#479

Merged
maltehuebner merged 1 commit intomainfrom
fix/sequence-strategy
Mar 4, 2026
Merged

Fix ID generation for Doctrine ORM 3 on PostgreSQL#479
maltehuebner merged 1 commit intomainfrom
fix/sequence-strategy

Conversation

@maltehuebner
Copy link
Contributor

Summary

  • Doctrine ORM 3 changed AUTO strategy from SEQUENCE to IDENTITY for PostgreSQL
  • Existing database uses sequences (data_id_seq, station_id_seq, etc.)
  • Explicitly set SEQUENCE strategy with correct sequence names on all 4 entities
  • Fixes: null value in column "id" violates not-null constraint when inserting data via API

Test plan

  • luft:fetch command successfully persists new data values
  • New stations and cities can be created via API

🤖 Generated with Claude Code

Doctrine ORM 3 changed AUTO strategy from SEQUENCE to IDENTITY for
PostgreSQL. Since the existing database uses sequences (data_id_seq,
station_id_seq, etc.), explicitly set SEQUENCE strategy with the
correct sequence names to prevent null ID inserts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@maltehuebner maltehuebner merged commit 9c2138d into main Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant