Skip to content
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

Import breaks sequences of ids. #83

Closed
petrovmp89 opened this issue Feb 10, 2017 · 2 comments
Closed

Import breaks sequences of ids. #83

petrovmp89 opened this issue Feb 10, 2017 · 2 comments

Comments

@petrovmp89
Copy link

If we set lookup by id and try to import records it will create new record with id that we set in import file. It ignores sequences of ids in database.
That will lead to 'ERROR: duplicate key value violates unique constraint' in future.

@monkbroc
Copy link
Collaborator

I don't think import by id is feasible due to the issues you note.

In some projects I created a column called import_key and set it to increasing numbers in the CSV file so I can import batches of rows several times in a deterministic way.

@monkbroc
Copy link
Collaborator

I added a note about this in the README.

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

No branches or pull requests

2 participants