Primary key that doesn't autoincrement. #1120
Replies: 1 comment
-
| There is no other way for now. | 
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
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