forked from aces/Loris
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[configuration] Add date_format as DataType in ConfigSettings (aces#6719
) Add "date_format" config format type for DoB and DoD, which configures whether day of month is included in date. Resolves aces#6678
- Loading branch information
1 parent
582de8f
commit 8620da2
Showing
5 changed files
with
54 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
SQL/New_patches/2020_06_16_Add_Date_Format_to_ConfigSettings_DataType.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
-- Add date_format option to DataType | ||
ALTER TABLE ConfigSettings | ||
MODIFY COLUMN `DataType` enum('text','boolean','email','instrument','textarea','scan_type','date_format','lookup_center','path','web_path') DEFAULT NULL; | ||
|
||
-- Update DataType of dobFormat | ||
UPDATE ConfigSettings | ||
SET DataType='date_format' WHERE Name='dobFormat'; | ||
|
||
-- Update DataType of dodFormat | ||
UPDATE ConfigSettings | ||
SET DataType='date_format' WHERE Name='dodFormat'; | ||
|
||
-- Convert old date casing combos to supported format | ||
UPDATE Config SET Value='Ymd' | ||
WHERE LOWER(Value)='ymd' | ||
AND ConfigID=(SELECT ID FROM ConfigSettings WHERE Name='dobFormat'); | ||
|
||
UPDATE Config SET Value='Ymd' | ||
WHERE LOWER(Value)='ymd' | ||
AND ConfigID=(SELECT ID FROM ConfigSettings WHERE Name='dodFormat'); | ||
|
||
UPDATE Config SET Value='Ym' | ||
WHERE LOWER(Value)='ym' | ||
AND ConfigID=(SELECT ID FROM ConfigSettings WHERE Name='dobFormat'); | ||
|
||
UPDATE Config SET Value='Ym' | ||
WHERE LOWER(Value)='ym' | ||
AND ConfigID=(SELECT ID FROM ConfigSettings WHERE Name='dodFormat'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters