Skip to content

feat: Add identity Mixin for Primary Keys - #473

Merged
cofin merged 4 commits into
mainfrom
big-int-identity
May 8, 2025
Merged

cofin merged 4 commits into
mainfrom
big-int-identity

Conversation

@cofin

@cofin cofin commented May 6, 2025

Copy link
Copy Markdown
Member

The sequences based BigInt key offers the most compatibility, but many would prefer to use the Identity column when the database supports it.

This changes implements a basic Identity primary key mixin

@codecov-commenter

codecov-commenter commented May 7, 2025 •

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.48%. Comparing base (e626875) to head (db1a2a3).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #473      +/-   ##
==========================================
+ Coverage   88.47%   88.48%   +0.01%     
==========================================
  Files          84       84              
  Lines        5476     5481       +5     
  Branches      678      678              
==========================================
+ Hits         4845     4850       +5     
  Misses        424      424              
  Partials      207      207              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cofin
cofin force-pushed the big-int-identity branch from 350bc90 to db1a2a3 Compare May 8, 2025 01:30
@cofin
cofin merged commit 8d4b59a into main May 8, 2025
@cofin
cofin deleted the big-int-identity branch May 8, 2025 01:30
@sonarqubecloud

sonarqubecloud Bot commented May 8, 2025

Copy link
Copy Markdown

@github-actions

github-actions Bot commented May 8, 2025

Copy link
Copy Markdown

Documentation preview will be available shortly at https://litestar-org.github.io/advanced-alchemy-docs-preview/473

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: BigIntPrimaryKey does not generate IDENTITY column in PostgreSQL using create_all() with orm_registry

2 participants