-
Notifications
You must be signed in to change notification settings - Fork 19
Rmnch main #127
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
base: main
Are you sure you want to change the base?
Rmnch main #127
Changes from all commits
d50d45e
3b19e6b
6eadc7e
d054a76
bd891c1
7c8c379
1ba72e7
0a971d5
e2f06d5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| USE db_iemr; | ||
|
|
||
| SET @column_exists = ( | ||
| SELECT COUNT(*) | ||
| FROM INFORMATION_SCHEMA.COLUMNS | ||
| WHERE TABLE_SCHEMA = DATABASE() | ||
| AND TABLE_NAME = 't_delivery_outcome' | ||
|
Check failure on line 7 in src/main/resources/db/migration/dbiemr/V78__rmnch_new_column.sql
|
||
| AND COLUMN_NAME = 'gestational_age_at_delivery' | ||
| ); | ||
|
|
||
| SET @sql = IF(@column_exists = 0, | ||
| 'ALTER TABLE t_delivery_outcome | ||
|
Check failure on line 12 in src/main/resources/db/migration/dbiemr/V78__rmnch_new_column.sql
|
||
| ADD COLUMN gestational_age_at_delivery VARCHAR(255) DEFAULT NULL', | ||
| 'SELECT "Column already exists"' | ||
|
Check failure on line 14 in src/main/resources/db/migration/dbiemr/V78__rmnch_new_column.sql
|
||
| ); | ||
|
|
||
| PREPARE stmt FROM @sql; | ||
| EXECUTE stmt; | ||
| DEALLOCATE PREPARE stmt; | ||
|
|
||
|
|
||
| SET @column_exists = ( | ||
| SELECT COUNT(*) | ||
| FROM INFORMATION_SCHEMA.COLUMNS | ||
| WHERE TABLE_SCHEMA = DATABASE() | ||
| AND TABLE_NAME = 't_delivery_outcome' | ||
| AND COLUMN_NAME = 'delivery_conducted_by' | ||
| ); | ||
|
|
||
| SET @sql = IF(@column_exists = 0, | ||
| 'ALTER TABLE t_delivery_outcome | ||
|
Check failure on line 31 in src/main/resources/db/migration/dbiemr/V78__rmnch_new_column.sql
|
||
| ADD COLUMN delivery_conducted_by VARCHAR(255) DEFAULT NULL', | ||
| 'SELECT "Column already exists"' | ||
| ); | ||
|
|
||
| PREPARE stmt FROM @sql; | ||
| EXECUTE stmt; | ||
| DEALLOCATE PREPARE stmt; | ||
|
|
||
|
|
||
| SET @column_exists = ( | ||
| SELECT COUNT(*) | ||
| FROM INFORMATION_SCHEMA.COLUMNS | ||
| WHERE TABLE_SCHEMA = DATABASE() | ||
| AND TABLE_NAME = 't_delivery_outcome' | ||
| AND COLUMN_NAME = 'modeOf_delivery' | ||
| ); | ||
|
|
||
| SET @sql = IF(@column_exists = 0, | ||
| 'ALTER TABLE t_delivery_outcome | ||
|
Check failure on line 50 in src/main/resources/db/migration/dbiemr/V78__rmnch_new_column.sql
|
||
| ADD COLUMN modeOf_delivery VARCHAR(255) DEFAULT NULL', | ||
| 'SELECT "Column already exists"' | ||
| ); | ||
|
|
||
| PREPARE stmt FROM @sql; | ||
| EXECUTE stmt; | ||
| DEALLOCATE PREPARE stmt; | ||
|
|
||
|
|
||
| SET @column_exists = ( | ||
| SELECT COUNT(*) | ||
| FROM INFORMATION_SCHEMA.COLUMNS | ||
| WHERE TABLE_SCHEMA = DATABASE() | ||
| AND TABLE_NAME = 't_delivery_outcome' | ||
| AND COLUMN_NAME = 'mother_condition' | ||
| ); | ||
|
|
||
| SET @sql = IF(@column_exists = 0, | ||
| 'ALTER TABLE t_delivery_outcome | ||
|
Check failure on line 69 in src/main/resources/db/migration/dbiemr/V78__rmnch_new_column.sql
|
||
| ADD COLUMN mother_condition VARCHAR(255) DEFAULT NULL', | ||
| 'SELECT "Column already exists"' | ||
| ); | ||
|
|
||
| PREPARE stmt FROM @sql; | ||
| EXECUTE stmt; | ||
| DEALLOCATE PREPARE stmt; | ||
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.
Fix Sonar-blocking multiline SQL string literals.
Line 12, Line 31, Line 50, and Line 69 use multiline quoted literals that are being flagged as illegal character (code point 10), which is currently failing analysis checks.
Proposed fix
Also applies to: 30-34, 49-53, 68-72
π§° Tools
πͺ GitHub Check: SonarCloud Code Analysis
[failure] 14-14: Define a constant instead of duplicating this literal 4 times.
See more on https://sonarcloud.io/project/issues?id=PSMRI_Amrit-DB&issues=AZ5FbBEXIO9wjLUi9kcd&open=AZ5FbBEXIO9wjLUi9kcd&pullRequest=127
[failure] 12-12: An illegal character with code point 10 was found in this literal.
See more on https://sonarcloud.io/project/issues?id=PSMRI_Amrit-DB&issues=AZ5FbBEWIO9wjLUi9kcZ&open=AZ5FbBEWIO9wjLUi9kcZ&pullRequest=127
π€ Prompt for AI Agents