Skip to content

CandidateID migration patch errors #9561

@maximemulder

Description

@maximemulder

While applying the SQL patch of #9556 to my recent Raisinbread installation, I got the following errors:

MariaDB [LORIS]> SOURCE 2025_02_05_change_candid_fk_to_id.sql;
Query OK, 0 rows affected (0.029 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 4 rows affected (0.003 sec)
Rows matched: 4  Changed: 4  Warnings: 0

Query OK, 4 rows affected (0.030 sec)                      
Records: 4  Duplicates: 0  Warnings: 0

Query OK, 4 rows affected (0.029 sec)                      
Records: 4  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (0.011 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 3 rows affected (0.004 sec)
Rows matched: 3  Changed: 3  Warnings: 0

Query OK, 3 rows affected (0.024 sec)                      
Records: 3  Duplicates: 0  Warnings: 0

Query OK, 3 rows affected (0.023 sec)                      
Records: 3  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (0.013 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (0.001 sec)
Rows matched: 0  Changed: 0  Warnings: 0

Query OK, 0 rows affected (0.030 sec)              
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (0.029 sec)              
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (0.014 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (0.001 sec)
Rows matched: 0  Changed: 0  Warnings: 0

Query OK, 0 rows affected (0.024 sec)              
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (0.022 sec)              
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (0.010 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 3 rows affected (0.002 sec)
Rows matched: 14  Changed: 3  Warnings: 0

Query OK, 14 rows affected (0.051 sec)             
Records: 14  Duplicates: 0  Warnings: 0

Query OK, 14 rows affected (0.045 sec)             
Records: 14  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (0.010 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 1136 rows affected (0.015 sec)
Rows matched: 1136  Changed: 1136  Warnings: 0

Query OK, 1136 rows affected (0.061 sec)                   
Records: 1136  Duplicates: 0  Warnings: 0

Query OK, 1136 rows affected (0.064 sec)                   
Records: 1136  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (0.009 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (0.000 sec)
Rows matched: 0  Changed: 0  Warnings: 0

Query OK, 0 rows affected (0.017 sec)              
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (0.016 sec)              
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (0.011 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 14 rows affected (0.003 sec)
Rows matched: 14  Changed: 14  Warnings: 0

Query OK, 14 rows affected (0.022 sec)                     
Records: 14  Duplicates: 0  Warnings: 0

Query OK, 14 rows affected (0.026 sec)                     
Records: 14  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (0.010 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 4 rows affected (0.003 sec)
Rows matched: 4  Changed: 4  Warnings: 0

Query OK, 4 rows affected (0.021 sec)                      
Records: 4  Duplicates: 0  Warnings: 0

Query OK, 4 rows affected (0.019 sec)                      
Records: 4  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (0.008 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 20295 rows affected (0.130 sec)
Rows matched: 20295  Changed: 20295  Warnings: 0

Query OK, 20295 rows affected (0.128 sec)                  
Records: 20295  Duplicates: 0  Warnings: 0

Query OK, 20295 rows affected (0.194 sec)                  
Records: 20295  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (0.007 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 4 rows affected (0.002 sec)
Rows matched: 4  Changed: 4  Warnings: 0

Query OK, 4 rows affected (0.018 sec)                      
Records: 4  Duplicates: 0  Warnings: 0

Query OK, 4 rows affected (0.017 sec)                      
Records: 4  Duplicates: 0  Warnings: 0

--------------
ALTER TABLE candidate_diagnosis_evolution_rel DROP CONSTRAINT `PK_candidate_diagnosis_evolution_rel`
--------------

ERROR 1091 (42000) at line 57 in file: '2025_02_05_change_candid_fk_to_id.sql': Can't DROP CONSTRAINT `PK_candidate_diagnosis_evolution_rel`; check that it exists
Query OK, 0 rows affected (0.006 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (0.000 sec)
Rows matched: 0  Changed: 0  Warnings: 0

Query OK, 0 rows affected (0.015 sec)              
Records: 0  Duplicates: 0  Warnings: 0

--------------
ALTER TABLE candidate_diagnosis_evolution_rel ADD CONSTRAINT PK_candidate_diagnosis_evolution_rel PRIMARY KEY (CandidateID, DxEvolutionID)
--------------

ERROR 1068 (42000) at line 61 in file: '2025_02_05_change_candid_fk_to_id.sql': Multiple primary key defined
Query OK, 0 rows affected (0.013 sec)              
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 50 rows affected (0.003 sec)
Rows matched: 50  Changed: 50  Warnings: 0

Query OK, 50 rows affected (0.021 sec)                     
Records: 50  Duplicates: 0  Warnings: 0

Query OK, 50 rows affected (0.021 sec)                     
Records: 50  Duplicates: 0  Warnings: 0

Query OK, 109 rows affected (0.002 sec)
Rows matched: 109  Changed: 109  Warnings: 0

Query OK, 109 rows affected (0.032 sec)                    
Records: 109  Duplicates: 0  Warnings: 0

Query OK, 109 rows affected (0.033 sec)                    
Records: 109  Duplicates: 0  Warnings: 0

Query OK, 198 rows affected (0.002 sec)
Rows matched: 198  Changed: 198  Warnings: 0

Query OK, 198 rows affected (0.023 sec)                    
Records: 198  Duplicates: 0  Warnings: 0

Query OK, 198 rows affected (0.028 sec)                    
Records: 198  Duplicates: 0  Warnings: 0

Query OK, 31 rows affected (0.001 sec)
Rows matched: 31  Changed: 31  Warnings: 0

Query OK, 31 rows affected (0.016 sec)                     
Records: 31  Duplicates: 0  Warnings: 0

Query OK, 31 rows affected (0.016 sec)                     
Records: 31  Duplicates: 0  Warnings: 0

Query OK, 3 rows affected (0.001 sec)
Rows matched: 3  Changed: 3  Warnings: 0

Query OK, 3 rows affected (0.015 sec)                      
Records: 3  Duplicates: 0  Warnings: 0

Query OK, 3 rows affected (0.015 sec)                      
Records: 3  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (0.040 sec)
Records: 0  Duplicates: 0  Warnings: 0

MariaDB version:

(loris-mri-python) lorisadmin@loris:~$ mariadb --version
mariadb from 11.4.4-MariaDB, client 15.2 for debian-linux-gnu (x86_64) using  EditLine wrapper

Metadata

Metadata

Assignees

Labels

Category: BugPR or issue that aims to report or fix a bugLanguage: SQLPR or issue that update SQL codePriority: HighPR or issue should be prioritised over others for review and testing

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions