Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Forward autoincrement property from field to column#674

Merged
collerek merged 9 commits into
ormar-orm:masterormar-orm/ormar:masterfrom
smuething:fix_autoincrement_columnssmuething/ormar:fix_autoincrement_columnsCopy head branch name to clipboard
Apr 20, 2026
Merged

Forward autoincrement property from field to column#674
collerek merged 9 commits into
ormar-orm:masterormar-orm/ormar:masterfrom
smuething:fix_autoincrement_columnssmuething/ormar:fix_autoincrement_columnsCopy head branch name to clipboard

Conversation

@smuething
Copy link
Copy Markdown
Contributor

The autoincrement property of ormar fields does not get propagated to the SQLAlchemy column definition. As a result, the autoincrement property of the SQLAlchemy column defaults to auto, making it impossible to create DDL that does not auto-increment the database column.

With this small patch, it becomes possible to create a table with a manually managed, integer-based PK.

smuething and others added 4 commits May 26, 2022 14:03
The autoincrement property of ormar fields did not get propagated to the SQLAlchemy column definition. As a result, the autoincrement property of the SQLAlchemy column defaulted to `auto`, making it impossible to create DDL that did not auto-increment the database column.
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Mar 23, 2024

CodSpeed Performance Report

Merging #674 will not alter performance

Comparing smuething:fix_autoincrement_columns (0c0c59b) with master (0014c46)

Summary

✅ 84 untouched benchmarks

collerek added 4 commits May 26, 2024 21:02
Verifies that autoincrement=False on an Integer primary key field is
forwarded to the underlying SQLAlchemy column.
Aligns the fmt target with master's tooling so contributors do not need
black installed locally.
@collerek collerek merged commit f57f858 into ormar-orm:master Apr 20, 2026
9 of 11 checks passed
collerek added a commit that referenced this pull request Apr 22, 2026
Bump version and add release notes for 0.24.0.

Features:
- on_update field option (#1273)
- fk_name override on ForeignKey (#849)
- forward autoincrement to SQLAlchemy column (#674)

Fixes:
- run standalone queries under AUTOCOMMIT isolation,
  restoring 0.21-era per-row CRUD performance (#1629, #1635)

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.