[openSUSE/open-build-service] c7492c: Recreate the foreign key after recreating the index
Branch: refs/heads/master Home: https://github.com/openSUSE/open-build-service Commit: c7492c4268b18c14271f266bdcc6e236dde2ad24 https://github.com/openSUSE/open-build-service/commit/c7492c4268b18c14271f26... Author: Henne Vogelsang <hvogel@opensuse.org> Date: 2021-05-06 (Thu, 06 May 2021) Changed paths: M src/api/db/migrate/20210505160725_add_kind_to_path_element_uniq_indexes.rb Log Message: ----------- Recreate the foreign key after recreating the index We ran into some mariadb problem when not doing this. ``` SHOW ENGINE INNODB STATUS; ... ------------------------ LATEST FOREIGN KEY ERROR ------------------------ ... DELETE FROM `repositories` WHERE `repositories`.`id` = 3229851 Foreign key constraint fails for table `obs_production`.`repositories`: ... CONSTRAINT `path_elements_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `repositories` (`id`) ... But the referencing table `obs_production`.`path_elements` or its .ibd file or the required index does not currently exist! ``` Commit: e9aaacf47f40a2f52c01160d2b198580fb8de350 https://github.com/openSUSE/open-build-service/commit/e9aaacf47f40a2f52c0116... Author: Henne Vogelsang <hvogel@opensuse.org> Date: 2021-05-07 (Fri, 07 May 2021) Changed paths: M src/api/db/migrate/20210505160725_add_kind_to_path_element_uniq_indexes.rb Log Message: ----------- Merge pull request #11112 from hennevogel/bugfix/path_elements-fk-desaster Recreate the foreign key after recreating the index Compare: https://github.com/openSUSE/open-build-service/compare/3feb34025aa4...e9aaac...
participants (1)
-
Henne Vogelsang