mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 12:54:38 +03:00
Delete identical rows from performer_stash_ids
This commit is contained in:
@@ -315,6 +315,16 @@ ALTER TABLE `scene_stash_ids_new` rename to `scene_stash_ids`;
|
|||||||
-- CREATE INDEX `index_scene_stash_ids_on_scene_id` ON `scene_stash_ids` (`scene_id`);
|
-- CREATE INDEX `index_scene_stash_ids_on_scene_id` ON `scene_stash_ids` (`scene_id`);
|
||||||
|
|
||||||
|
|
||||||
|
-- delete identical rows from performer_stash_ids before performing this
|
||||||
|
-- translation
|
||||||
|
DELETE FROM `performer_stash_ids` WHERE
|
||||||
|
rowid > (
|
||||||
|
SELECT MIN(rowid) FROM `performer_stash_ids` d
|
||||||
|
WHERE `performer_stash_ids`.`performer_id` = d.`performer_id` AND
|
||||||
|
`performer_stash_ids`.`endpoint` = d.`endpoint` AND
|
||||||
|
`performer_stash_ids`.`stash_id` = d.`stash_id`
|
||||||
|
);
|
||||||
|
|
||||||
CREATE TABLE `performer_stash_ids_new` (
|
CREATE TABLE `performer_stash_ids_new` (
|
||||||
`performer_id` integer NOT NULL,
|
`performer_id` integer NOT NULL,
|
||||||
`endpoint` varchar(255) NOT NULL,
|
`endpoint` varchar(255) NOT NULL,
|
||||||
|
|||||||
Reference in New Issue
Block a user