mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-03 18:50:25 -05:00
Fix AddProperParentChildRelationBaseItemWithCascade migration deleting all items
This commit is contained in:
parent
baa7f5f0b0
commit
3fc71293b4
@ -15,22 +15,22 @@ DELETE FROM BaseItems
|
||||
WHERE
|
||||
ParentId IS NOT NULL
|
||||
AND
|
||||
NOT EXISTS(SELECT 1 FROM BaseItems parent WHERE ParentId = parent.Id);
|
||||
NOT EXISTS(SELECT 1 FROM BaseItems parent WHERE parent.Id = BaseItems.ParentId);
|
||||
DELETE FROM BaseItems
|
||||
WHERE
|
||||
ParentId IS NOT NULL
|
||||
AND
|
||||
NOT EXISTS(SELECT 1 FROM BaseItems parent WHERE ParentId = parent.Id);
|
||||
NOT EXISTS(SELECT 1 FROM BaseItems parent WHERE parent.Id = BaseItems.ParentId);
|
||||
DELETE FROM BaseItems
|
||||
WHERE
|
||||
ParentId IS NOT NULL
|
||||
AND
|
||||
NOT EXISTS(SELECT 1 FROM BaseItems parent WHERE ParentId = parent.Id);
|
||||
NOT EXISTS(SELECT 1 FROM BaseItems parent WHERE parent.Id = BaseItems.ParentId);
|
||||
DELETE FROM BaseItems
|
||||
WHERE
|
||||
ParentId IS NOT NULL
|
||||
AND
|
||||
NOT EXISTS(SELECT 1 FROM BaseItems parent WHERE ParentId = parent.Id);
|
||||
NOT EXISTS(SELECT 1 FROM BaseItems parent WHERE parent.Id = BaseItems.ParentId);
|
||||
""");
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BaseItems_BaseItems_ParentId",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user