Skip to content

Commit

Permalink
Updated schema file to fix afpimmunization columns data types
Browse files Browse the repository at this point in the history
  • Loading branch information
Flava177 committed Jan 23, 2025
1 parent c27b2a9 commit 27c00dc
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion sormas-backend/src/main/resources/sql/sormas_schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -15206,4 +15206,25 @@ SET responsestatus =
WHEN responsestatus = '2' THEN '1'
ELSE responsestatus
END;
INSERT INTO schema_version(version_number, comment) VALUES (721, 'removed not started enum');
INSERT INTO schema_version(version_number, comment) VALUES (721, 'removed not started enum');

ALTER TABLE afpimmunization DROP COLUMN opvdoseatbirth;
ALTER TABLE afpimmunization DROP COLUMN seconddose;
ALTER TABLE afpimmunization DROP COLUMN fourthdose;
ALTER TABLE afpimmunization DROP COLUMN firstdose;
ALTER TABLE afpimmunization DROP COLUMN thirddose;
ALTER TABLE afpimmunization DROP COLUMN lastdose;
ALTER TABLE afpimmunization DROP COLUMN dateLastOpvDosesReceivedThroughSia;
ALTER TABLE afpimmunization DROP COLUMN dateLastIpvDosesReceivedThroughSia;
ALTER TABLE afpimmunization DROP COLUMN datelastipvreceivedthroughsia;

ALTER TABLE afpimmunization ADD COLUMN opvdoseatbirth DATE;
ALTER TABLE afpimmunization ADD COLUMN seconddose DATE;
ALTER TABLE afpimmunization ADD COLUMN fourthdose DATE;
ALTER TABLE afpimmunization ADD COLUMN firstdose DATE;
ALTER TABLE afpimmunization ADD COLUMN thirddose DATE;
ALTER TABLE afpimmunization ADD COLUMN lastdose DATE;
ALTER TABLE afpimmunization ADD COLUMN dateLastOpvDosesReceivedThroughSia DATE;
ALTER TABLE afpimmunization ADD COLUMN dateLastIpvDosesReceivedThroughSia DATE;

INSERT INTO schema_version(version_number, comment) VALUES (722, 'Dropped and added columns in afpimmunization to change types to date');

0 comments on commit 27c00dc

Please sign in to comment.