-
Notifications
You must be signed in to change notification settings - Fork 14
Migration/hbyc table #74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
SauravBizbRolly
wants to merge
6
commits into
main
Choose a base branch
from
migration/hbyc_table
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
ffb7401
add new column in anc vist table
SauravBizbRolly e8ccddd
add new column in hbyc table
SauravBizbRolly 706d5d8
add new column in hbyc table
SauravBizbRolly a532d36
rename version
SauravBizbRolly 3d1f8bb
fix coderabit comments
SauravBizbRolly ffe69e5
fix change varchar to date
SauravBizbRolly File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
43 changes: 43 additions & 0 deletions
43
src/main/resources/db/migration/dbiemr/V40__DB_IEMR_hbyc_table_changes.sql
This file contains hidden or 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,43 @@ | ||
| USE db_iemr; | ||
| CREATE TABLE IF NOT EXISTS `t_hbyc_child_visits` ( | ||
| `id` bigint NOT NULL AUTO_INCREMENT, | ||
| `beneficiary_id` bigint DEFAULT NULL, | ||
| `household_id` bigint DEFAULT NULL, | ||
| `visit_day` varchar(50) DEFAULT NULL, | ||
| `user_id` int DEFAULT NULL, | ||
| `hbyc_due_date` DATE DEFAULT NULL, | ||
| `hbyc_visit_date` DATE DEFAULT NULL, | ||
| `is_baby_alive` tinyint(1) DEFAULT 1, | ||
| `date_of_death` DATE DEFAULT NULL, | ||
| `reason_for_death` varchar(255) DEFAULT NULL, | ||
| `place_of_death` varchar(255) DEFAULT NULL, | ||
| `other_place_of_death` varchar(255) DEFAULT NULL, | ||
| `baby_weight` decimal(4,2) DEFAULT NULL, | ||
| `is_child_sick` tinyint(1) DEFAULT NULL, | ||
| `is_exclusive_breastfeeding` tinyint(1) DEFAULT NULL, | ||
| `is_mother_counseled_exbf` tinyint(1) DEFAULT NULL, | ||
| `has_child_started_complementary_feeding` tinyint(1) DEFAULT NULL, | ||
| `is_mother_counseled_cf` tinyint(1) DEFAULT NULL, | ||
| `is_weight_recorded_by_aww` tinyint(1) DEFAULT NULL, | ||
| `is_developmental_delay` tinyint(1) DEFAULT NULL, | ||
| `is_measles_vaccine_given` tinyint(1) DEFAULT NULL, | ||
| `is_vitamin_a_given` tinyint(1) DEFAULT NULL, | ||
| `is_ors_available` tinyint(1) DEFAULT NULL, | ||
| `is_ifa_syrup_available` tinyint(1) DEFAULT NULL, | ||
| `is_ors_given` tinyint(1) DEFAULT NULL, | ||
| `is_ifa_syrup_given` tinyint(1) DEFAULT NULL, | ||
| `is_handwashing_counseling_given` tinyint(1) DEFAULT NULL, | ||
| `is_parenting_counseling_given` tinyint(1) DEFAULT NULL, | ||
| `is_family_planning_counseling_given` tinyint(1) DEFAULT NULL, | ||
| `diarrhoea_episode` tinyint(1) DEFAULT NULL, | ||
| `pneumonia_symptoms` tinyint(1) DEFAULT NULL, | ||
| `temperature` decimal(4,2) DEFAULT NULL, | ||
| `mcp_card_images` json DEFAULT NULL, | ||
| `created_at` datetime DEFAULT CURRENT_TIMESTAMP, | ||
| `updated_at` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, | ||
| `created_by` varchar(100) DEFAULT NULL, | ||
| `is_breathing_difficulty` tinyint(1) DEFAULT NULL, | ||
| `is_complementary_feeding` tinyint(1) DEFAULT NULL, | ||
| PRIMARY KEY (`id`) | ||
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π οΈ Refactor suggestion | π Major
Use
bigintforuser_idto match other ID columns.The
user_idcolumn usesintwhilebeneficiary_idandhousehold_idusebigint. This type inconsistency could cause issues if the user ID space grows beyond the int range (2,147,483,647) and creates unnecessary type coercion in joins.π§ Recommended fix
π Committable suggestion
π€ Prompt for AI Agents