calder12
1 week ago

Importing old data with ids

Posted 1 week ago by calder12

Okay so I have this issue. I am bringing in data to a new Laravel application that has existing auto-increment ids. I am curious if there is a way in Eloquent to do this and have all the related tables ids match up.

For example. The old data is missing the first 17 companies. So when I import that data company id 18 in the old table becomes company id 1 in the new one. Clearly this messes with any other table where that id is referenced.

Thoughts?

Please sign in or create an account to participate in this conversation.