-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AUTOINCREMENT support #94
Comments
@newmanjeff I think we can, there is overhead associated with it https://www.sqlite.org/autoinc.html |
I think the area to do that would be here ecto_sqlite3/lib/ecto/adapters/sqlite3/connection.ex Lines 1731 to 1750 in d4689ab
Just need to handle the case where two primary keys are provided and not to use autoincrement in that case. |
Thanks -- I'll take a stab at it in a bit. |
Perhaps it could also be an opt in using the |
I added an MR that includes AUTOINCREMENT for My only hesitation here is backwards-compatibility. The resulting schema will be different if the database was created on an older version vs this version. |
A lot of the issues I am grappling with is trying to maintain some backwards compatibility with old the old ecto2 sqlite adapter and decisions made there and this one. I think, let's just rip the band-aid off and force the issue. If we backwards compatibility is absolutely necessary, we can add in an option to turn off the new behavior. |
Sounds good to me. |
I just stumbled upon this issue after searching about how ecto_sqlite3 deals with |
Any updates on this? |
No updates on this. I haven't explored this more. If you want to, you can take a stab at it 😄 |
Is there any way to specify that a table's primary key should be AUTOINCREMENT?
The text was updated successfully, but these errors were encountered: