-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
data import from csv, auto-incremented big integer for ID #20550
Labels
Comments
@semorur What database are you using? |
Postgresql
|
yes, it looks like the same problem.
This problem now exists for BIG integer.
Usual integer doesn’t have the problem. It takes the maximum id value +1 automatically
best regards,
Sergey Morozov
… 28 нояб. 2023 г., в 18:18, Rijk van Zanten ***@***.***> написал(а):
@jaads <https://github.com/jaads> This feels very similar to #6321 <#6321> with fix #19328 <#19328> 🤔 Any thoughts?
—
Reply to this email directly, view it on GitHub <#20550 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/BEJMCZUWMIJMMJHSU2OXQULYGYFEZAVCNFSM6AAAAAA74V5NK2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZQGIYTEMJSGI>.
You are receiving this because you were mentioned.
|
Interesting. I just checked it. Currently the sequence will be reset only for integer primary keys, not big integer: directus/api/src/services/items.ts Line 191 in c357d8d
Assuming the SQL statement to reset stays the same, regardless of the type, this would be easy to fix/extend. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Describe the Bug
If I have a table with auto-incremented big integer for ID and when I import data with id numbers it doesn't restart sequence number. I tried to reproduce it with auto-increment integer, but it worked fine.
for example, when I have latest number 10, I import data with ID 11,12,13,14,15. When I add a new item there is error, because incremention remained at 10, not 15. So the next ID will be 11, but it's imposible because values have to be unique.
Also the same problem, when you allow editing ID and write in some numbers. for integer its is fine, for big integer it is not.
To Reproduce
Directus Version
v.10.8.2
Hosting Strategy
Self-Hosted (Docker Image)
The text was updated successfully, but these errors were encountered: