[DiscordArchive] Is there a way to ignore the data with FK violation?
[DiscordArchive] Is there a way to ignore the data with FK violation?
Archived author: Nefertum • Posted: 2018-06-01T17:35:27.677000+00:00
Original source
Is there a way to ignore the data with FK violation?
Archived author: Kraft • Posted: 2018-06-01T17:36:30.258000+00:00
Original source
Probably, but I am only an intermediate SQL developer. I'd need to actually look it up.
Archived author: Nefertum • Posted: 2018-06-01T17:38:37.303000+00:00
Original source
https://stackoverflow.com/questions/4235...nsert-into something like this?
[Embed: How to ignore rows that violate foreign key constraint in Postgres...]
In this sql statement
INSERT INTO child (parentId, value) SELECT parentId, value FROM temptable
child.parentId is a foreign key pointing to parent.id. Rows in the parent table might be deleted at...
https://stackoverflow.com/questions/4235...nsert-into
Archived author: Kraft • Posted: 2018-06-01T17:39:08.487000+00:00
Original source
We will have issues with certain tables. I noticed today that character_spell has a composite primary key that uses the spell_id as well as the guid. I might be mistaken, but I don't think something can be an FK if it is part of a composite PK
Archived author: Kraft • Posted: 2018-06-01T17:41:11.855000+00:00
Original source
If this is the case then you would have to do some more extreme things, like add a new ID column as a PK for tables like that, remove the old composite PK and then finally link up the FK (which means there might also end up being server code changes to support it).
Archived author: Kraft • Posted: 2018-06-01T17:41:39.688000+00:00
Original source
Something like this is a big enough effort that a group of people really need to do a research spike into how big and/or disrupting of an effort it would be.
Archived author: Nefertum • Posted: 2018-06-01T17:43:52.033000+00:00
Original source
Yes