Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] Is there a way to ignore the data with FK violation?

[DiscordArchive] Is there a way to ignore the data with FK violation?

[DiscordArchive] Is there a way to ignore the data with FK violation?

rektbyfaith
Administrator
0
06-01-2018, 05:35 PM
#1
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?
rektbyfaith
06-01-2018, 05:35 PM #1

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?

rektbyfaith
Administrator
0
06-01-2018, 05:36 PM
#2
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.
rektbyfaith
06-01-2018, 05:36 PM #2

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.

rektbyfaith
Administrator
0
06-01-2018, 05:38 PM
#3
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
rektbyfaith
06-01-2018, 05:38 PM #3

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

rektbyfaith
Administrator
0
06-01-2018, 05:39 PM
#4
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
rektbyfaith
06-01-2018, 05:39 PM #4

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

rektbyfaith
Administrator
0
06-01-2018, 05:41 PM
#5
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).
rektbyfaith
06-01-2018, 05:41 PM #5

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).

rektbyfaith
Administrator
0
06-01-2018, 05:41 PM
#6
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.
rektbyfaith
06-01-2018, 05:41 PM #6

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.

rektbyfaith
Administrator
0
06-01-2018, 05:43 PM
#7
Archived author: Nefertum • Posted: 2018-06-01T17:43:52.033000+00:00
Original source

Yes
rektbyfaith
06-01-2018, 05:43 PM #7

Archived author: Nefertum • Posted: 2018-06-01T17:43:52.033000+00:00
Original source

Yes

Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)