mirror of
https://github.com/stashapp/stash.git
synced 2025-12-16 20:07:05 +03:00
adding exists check before dropping constraints (#5363)
Co-authored-by: Arshad Khan <arshad@Arshads-MacBook-Air-2.local>
This commit is contained in:
@@ -144,9 +144,9 @@ INSERT INTO `performer_urls`
|
||||
FROM `performers`
|
||||
WHERE `performers`.`instagram` IS NOT NULL AND `performers`.`instagram` != '';
|
||||
|
||||
DROP INDEX `performers_name_disambiguation_unique`;
|
||||
DROP INDEX `performers_name_unique`;
|
||||
DROP TABLE `performers`;
|
||||
DROP INDEX IF EXISTS `performers_name_disambiguation_unique`;
|
||||
DROP INDEX IF EXISTS `performers_name_unique`;
|
||||
DROP TABLE IF EXISTS `performers`;
|
||||
ALTER TABLE `performers_new` rename to `performers`;
|
||||
|
||||
CREATE UNIQUE INDEX `performers_name_disambiguation_unique` on `performers` (`name`, `disambiguation`) WHERE `disambiguation` IS NOT NULL;
|
||||
|
||||
Reference in New Issue
Block a user