Skip to content

Commit 25fa0bb

Browse files
authored
[SQL] 24.0.0 release patch fix truncation error (#8438)
Since the order in which the patches were run was changed by #8390. The statements in this PR which add the date_format cause a truncation error since they also "remove" the log_level enum option. The patch that is run first now as patch _A already contains the date format and is thus sufficient to replace the statements removed here.
1 parent bb11da5 commit 25fa0bb

File tree

5 files changed

+4
-11
lines changed

5 files changed

+4
-11
lines changed

SQL/Archive/24.0/2020-06-16-Add_Date_Format_to_ConfigSettings_DataType.sql

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
-- Add date_format option to DataType
2-
ALTER TABLE ConfigSettings
3-
MODIFY COLUMN `DataType` enum('text','boolean','email','instrument','textarea','scan_type','date_format','lookup_center','path','web_path') DEFAULT NULL;
41

52
-- Update DataType of dobFormat
63
UPDATE ConfigSettings
@@ -11,11 +8,11 @@ UPDATE ConfigSettings
118
SET DataType='date_format' WHERE Name='dodFormat';
129

1310
-- Convert old date casing combos to supported format
14-
UPDATE Config SET Value='Ymd'
11+
UPDATE Config SET Value='Ymd'
1512
WHERE LOWER(Value)='ymd'
1613
AND ConfigID=(SELECT ID FROM ConfigSettings WHERE Name='dobFormat');
1714

18-
UPDATE Config SET Value='Ymd'
15+
UPDATE Config SET Value='Ymd'
1916
WHERE LOWER(Value)='ymd'
2017
AND ConfigID=(SELECT ID FROM ConfigSettings WHERE Name='dodFormat');
2118

SQL/Release_patches/23.0_To_24.0_upgrade_A.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
SELECT 'Running: SQL/Archive/24.0/2021-07-19-log_level.sql';
1+
SELECT 'Running: SQL/Archive/24.0/2019-06-01-log_level-2021-07-19.sql';
22

33
ALTER TABLE `ConfigSettings` MODIFY COLUMN `DataType` ENUM('text','boolean','email','instrument','textarea','scan_type','date_format','lookup_center','path','web_path', 'log_level');
44

SQL/Release_patches/23.0_To_24.0_upgrade_B.sql

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,6 @@ UPDATE users u, history h
151151

152152
SELECT 'Running: SQL/Archive/24.0/2020-06-16-Add_Date_Format_to_ConfigSettings_DataType.sql';
153153

154-
-- Add date_format option to DataType
155-
ALTER TABLE ConfigSettings
156-
MODIFY COLUMN `DataType` enum('text','boolean','email','instrument','textarea','scan_type','date_format','lookup_center','path','web_path') DEFAULT NULL;
157-
158154
-- Update DataType of dobFormat
159155
UPDATE ConfigSettings
160156
SET DataType='date_format' WHERE Name='dobFormat';

raisinbread/migration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ ________________________________________________________________________________
3131
2021-06-17_mnc2bids_Config_Settings.sql
3232
2021-06-23_set_default_ScannerID_to_NULL.sql
3333
2021-06-25_add_alias_column_to_parameter_type_for_bids_parameter_names.sql
34-
2021-07-19-log_level.sql
34+
2019-06-01-log_level-2021-07-19.sql
3535
2021-07-28_add_EchoTime_field_to_violation_tables.sql
3636
2021-07-29-physiological_task_event_columns_types.sql
3737
2021-07-29_modify_center_name_in_mri_protocol.sql

0 commit comments

Comments
 (0)