Primary key that doesn't autoincrement. #1120
Unanswered
jonyscathe
asked this question in
Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First Check
Commit to Help
Example Code
Description
If I have a situation where I have a primary key that is set by some other entity external to the database then I don't want it to autoincrement.
Is the only way to do this to use
sa_column_kwargs={'autoincrement': False}
as above?It does work, but it is hardly the nicest method for controlling autoincrement...
Operating System
Linux
Operating System Details
No response
SQLModel Version
0.0.22
Python Version
3.12.6
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions