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

Problem with IDs #42

Open
philipbaginski opened this issue Jun 4, 2022 · 1 comment
Open

Problem with IDs #42

philipbaginski opened this issue Jun 4, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@philipbaginski
Copy link

philipbaginski commented Jun 4, 2022

Hi!

Probably I'm doing something wrong, but I don;t now what. Trying to import table with of course ID column, and because this IDs are FK in another table, I have to have them the same.

I have 14 models but ID 9 and 12 are not existing, so after import I see 14 models with IDs from 1 to 14.

What should I do to import table with IDs exactly the same as in the file?

And also I have deleted_at column with dates and there is no way to import it.

Added: Column deleted_at can be mapped by added field in the resource, but field ID is not mapped by package.

@simonhamp
Copy link
Owner

Hey @philipbaginski sorry for taking so long to reply to this.

What should I do to import table with IDs exactly the same as in the file?

This package currently assumes that you're just importing into a fresh table with no relationships. I haven't yet had the need to import rows with specific IDs or update pre-existing rows with imported data. I think this is a good feature request tho.

I'll mark this as an enhancement and hopefully come back around to it at some point. Or maybe someone else will raise a PR for it.

@simonhamp simonhamp added the enhancement New feature or request label Mar 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants