You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sormas-backend/src/main/resources/sql/sormas_schema.sql
+37Lines changed: 37 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -16686,4 +16686,41 @@ UPDATE drugsusceptibility_history SET trimethoprimsulfamethoxazolemethod = 'OTHE
16686
16686
16687
16687
INSERT INTO schema_version (version_number, comment) VALUES (645, '#14036 - AST 3-column form: MIC free-text, drop zone/surveillance');
16688
16688
16689
+
-- 02-07-2026 fixing the typos
16690
+
16691
+
DO $$
16692
+
BEGIN
16693
+
16694
+
-- Rename the otherneurologicalsymptoms symptom column
16695
+
IF EXISTS (SELECT 1 FROM information_schema.columns WHERE table_schema = current_schema() AND table_name = 'symptoms' AND column_name = 'otherneurolocalsymptom')
16696
+
AND NOT EXISTS (SELECT 1 FROM information_schema.columns WHERE table_schema = current_schema() AND table_name = 'symptoms' AND column_name = 'otherneurologicalsymptoms') THEN
16697
+
16698
+
ALTER TABLE symptoms RENAME COLUMN otherneurolocalsymptom TO otherneurologicalsymptoms;
16699
+
END IF;
16700
+
16701
+
-- Rename the otherneurologicalsymptoms text column
16702
+
IF EXISTS (SELECT 1 FROM information_schema.columns WHERE table_schema = current_schema() AND table_name = 'symptoms' AND column_name = 'otherneurolocalsymptomtext')
16703
+
AND NOT EXISTS (SELECT 1 FROM information_schema.columns WHERE table_schema = current_schema() AND table_name = 'symptoms' AND column_name = 'otherneurologicalsymptomstext') THEN
16704
+
16705
+
ALTER TABLE symptoms RENAME COLUMN otherneurolocalsymptomtext TO otherneurologicalsymptomstext;
16706
+
END IF;
16707
+
16708
+
16709
+
-- Rename the otherneurologicalsymptoms symptom column in history
16710
+
IF EXISTS (SELECT 1 FROM information_schema.columns WHERE table_schema = current_schema() AND table_name = 'symptoms_history' AND column_name = 'otherneurolocalsymptom')
16711
+
AND NOT EXISTS (SELECT 1 FROM information_schema.columns WHERE table_schema = current_schema() AND table_name = 'symptoms_history' AND column_name = 'otherneurologicalsymptoms') THEN
16712
+
16713
+
ALTER TABLE symptoms_history RENAME COLUMN otherneurolocalsymptom TO otherneurologicalsymptoms;
16714
+
END IF;
16715
+
16716
+
-- Rename the otherneurologicalsymptoms text column in history
16717
+
IF EXISTS (SELECT 1 FROM information_schema.columns WHERE table_schema = current_schema() AND table_name = 'symptoms_history' AND column_name = 'otherneurolocalsymptomtext')
16718
+
AND NOT EXISTS (SELECT 1 FROM information_schema.columns WHERE table_schema = current_schema() AND table_name = 'symptoms_history' AND column_name = 'otherneurologicalsymptomstext') THEN
16719
+
16720
+
ALTER TABLE symptoms_history RENAME COLUMN otherneurolocalsymptomtext TO otherneurologicalsymptomstext;
16721
+
END IF;
16722
+
16723
+
END $$;
16724
+
INSERT INTO schema_version (version_number, comment) VALUES (646, 'Correcting the typos of column names');
16725
+
16689
16726
-- *** Insert new sql commands BEFORE this line. Remember to always consider _history tables. ***
0 commit comments