Skip to content
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

Release 1.29.0 #7322

Merged
merged 3 commits into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bhima",
"version": "1.28.0",
"version": "1.29.0",
"description": "A rural hospital information management system.",
"main": "npm run build",
"scripts": {
Expand Down
47 changes: 1 addition & 46 deletions server/models/migrations/next/migrate.sql
Original file line number Diff line number Diff line change
@@ -1,46 +1 @@
/* v1.28.x */
DELETE FROM role_unit WHERE unit_id = (SELECT id FROM unit WHERE `path` = '/admin/odk-settings');
DELETE FROM unit WHERE `path` = '/admin/odk-settings';
DROP TABLE IF EXISTS `odk_central_integration`;

-- remove references to stock_changes report
DELETE FROM role_unit WHERE unit_id = (SELECT id FROM unit WHERE `path` = '/reports/stock_changes');
DELETE FROM unit WHERE `path` = '/reports/stock_changes';
DELETE FROM report where `report_key` = 'stock_changes';

/**
* @author: lomamech
* @description: Payroll Hospital general model #7000
* @date: 2023-07-23
*/
DROP TABLE IF EXISTS `title_employee`;
CREATE TABLE `title_employee` (
`id` TINYINT(3) UNSIGNED NOT NULL AUTO_INCREMENT,
`title_txt` VARCHAR(100) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `title_1` (`title_txt`)
) ENGINE=InnoDB DEFAULT CHARACTER SET = utf8mb4 DEFAULT COLLATE = utf8mb4_unicode_ci;

INSERT IGNORE INTO unit VALUES
(318, 'Job Titles Management','TREE.TITLE','',57, '/titles');

CALL add_column_if_missing('employee', 'title_employee_id', 'TINYINT(3) UNSIGNED DEFAULT NULL');
ALTER TABLE `employee` ADD CONSTRAINT `employee__title_employee` FOREIGN KEY (`title_employee_id`) REFERENCES `title_employee` (`id`);

CALL add_column_if_missing('enterprise_setting', 'percentage_fixed_bonus', 'TINYINT(3) UNSIGNED NOT NULL DEFAULT 100');

/**
* @author: lomamech
* @description: Move is_medical property from employee to title #7170
* @date: 2023-08-25
*/
ALTER TABLE `employee` DROP COLUMN `is_medical`;
CALL add_column_if_missing('title_employee', 'is_medical', 'TINYINT(1) DEFAULT 0');

/**
* author: jniles
* description: enable_external_access allows backup scripts to determine which
* user accounts to leave unlocked.
* date: 2023-10-17
*/
CALL add_column_if_missing('user', 'enable_external_access', 'TINYINT(1) NOT NULL DEFAULT 0');
/* v1.29.0 */
46 changes: 46 additions & 0 deletions server/models/migrations/v1.28.0-v1.29.0/migrate.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/* v1.28.x */
DELETE FROM role_unit WHERE unit_id = (SELECT id FROM unit WHERE `path` = '/admin/odk-settings');
DELETE FROM unit WHERE `path` = '/admin/odk-settings';
DROP TABLE IF EXISTS `odk_central_integration`;

-- remove references to stock_changes report
DELETE FROM role_unit WHERE unit_id = (SELECT id FROM unit WHERE `path` = '/reports/stock_changes');
DELETE FROM unit WHERE `path` = '/reports/stock_changes';
DELETE FROM report where `report_key` = 'stock_changes';

/**
* @author: lomamech
* @description: Payroll Hospital general model #7000
* @date: 2023-07-23
*/
DROP TABLE IF EXISTS `title_employee`;
CREATE TABLE `title_employee` (
`id` TINYINT(3) UNSIGNED NOT NULL AUTO_INCREMENT,
`title_txt` VARCHAR(100) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `title_1` (`title_txt`)
) ENGINE=InnoDB DEFAULT CHARACTER SET = utf8mb4 DEFAULT COLLATE = utf8mb4_unicode_ci;

INSERT IGNORE INTO unit VALUES
(318, 'Job Titles Management','TREE.TITLE','',57, '/titles');

CALL add_column_if_missing('employee', 'title_employee_id', 'TINYINT(3) UNSIGNED DEFAULT NULL');
ALTER TABLE `employee` ADD CONSTRAINT `employee__title_employee` FOREIGN KEY (`title_employee_id`) REFERENCES `title_employee` (`id`);

CALL add_column_if_missing('enterprise_setting', 'percentage_fixed_bonus', 'TINYINT(3) UNSIGNED NOT NULL DEFAULT 100');

/**
* @author: lomamech
* @description: Move is_medical property from employee to title #7170
* @date: 2023-08-25
*/
ALTER TABLE `employee` DROP COLUMN `is_medical`;
CALL add_column_if_missing('title_employee', 'is_medical', 'TINYINT(1) DEFAULT 0');

/**
* author: jniles
* description: enable_external_access allows backup scripts to determine which
* user accounts to leave unlocked.
* date: 2023-10-17
*/
CALL add_column_if_missing('user', 'enable_external_access', 'TINYINT(1) NOT NULL DEFAULT 0');