mark patches folder as applied to server.
This commit is contained in:
@@ -0,0 +1 @@
|
||||
ALTER TABLE `m_loan` CHANGE COLUMN `arrearstolerance_amount` `arrearstolerance_amount` DECIMAL(19,6) NULL;
|
||||
@@ -0,0 +1,9 @@
|
||||
SET foreign_key_checks = 0;
|
||||
drop table IF EXISTS `stretchydata_dataset_fields`;
|
||||
drop table IF EXISTS `stretchydata_datasettype`;
|
||||
drop table IF EXISTS `stretchydata_dataset`;
|
||||
|
||||
drop table IF EXISTS `m_client_xadditional information`;
|
||||
drop table IF EXISTS `m_client_xhighly improbable info`;
|
||||
drop table IF EXISTS `m_loan_xadditional information`;
|
||||
SET foreign_key_checks = 1;
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
|
||||
ALTER TABLE m_permission
|
||||
CHANGE COLUMN `is_maker_checker` `can_maker_checker` TINYINT(1) NOT NULL DEFAULT '1' ;
|
||||
|
||||
/*
|
||||
add all checker permissions
|
||||
*/
|
||||
insert into m_permission(grouping, code, entity_name, action_name, can_maker_checker)
|
||||
select grouping, concat(code, '_CHECKER'), entity_name, action_name, false
|
||||
from m_permission
|
||||
where code not like 'READ_%'
|
||||
and grouping != 'special';
|
||||
|
||||
|
||||
/* 5k not enough for command json */
|
||||
ALTER TABLE m_portfolio_command_source
|
||||
CHANGE COLUMN `command_as_json` `command_as_json` TEXT NOT NULL ;
|
||||
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
DROP TABLE IF EXISTS `m_acc_coa`;
|
||||
|
||||
DROP TABLE IF EXISTS `acc_gl_account`;
|
||||
CREATE TABLE `acc_gl_account` (
|
||||
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||
`name` VARCHAR(45) NOT NULL,
|
||||
`parent_id` BIGINT(20) NULL DEFAULT NULL,
|
||||
`gl_code` VARCHAR(45) NOT NULL,
|
||||
`disabled` TINYINT(1) NOT NULL DEFAULT '0',
|
||||
`manual_journal_entries_allowed` TINYINT(1) NOT NULL DEFAULT '1',
|
||||
`header_account` TINYINT(1) NOT NULL DEFAULT '0',
|
||||
`classification` VARCHAR(45) NOT NULL,
|
||||
`description` VARCHAR(500) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE INDEX `acc_gl_code` (`gl_code`),
|
||||
INDEX `FK_ACC_0000000001` (`parent_id`),
|
||||
CONSTRAINT `FK_ACC_0000000001` FOREIGN KEY (`parent_id`) REFERENCES `acc_gl_account` (`id`)
|
||||
)
|
||||
COLLATE='utf8_general_ci'
|
||||
ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
DROP TABLE IF EXISTS `acc_gl_closure`;
|
||||
CREATE TABLE `acc_gl_closure` (
|
||||
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||
`office_id` BIGINT(20) NOT NULL,
|
||||
`closing_date` DATE NOT NULL,
|
||||
`is_deleted` INT(20) NOT NULL DEFAULT '0',
|
||||
`createdby_id` BIGINT(20) NULL DEFAULT NULL,
|
||||
`lastmodifiedby_id` BIGINT(20) NULL DEFAULT NULL,
|
||||
`created_date` DATETIME NULL DEFAULT NULL,
|
||||
`lastmodified_date` DATETIME NULL DEFAULT NULL,
|
||||
`comments` VARCHAR(500) NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
INDEX `FK_acc_gl_closure_m_office` (`office_id`),
|
||||
INDEX `FK_acc_gl_closure_m_appuser` (`createdby_id`),
|
||||
INDEX `FK_acc_gl_closure_m_appuser_2` (`lastmodifiedby_id`),
|
||||
UNIQUE INDEX `office_id_closing_date` (`office_id`, `closing_date`),
|
||||
CONSTRAINT `FK_acc_gl_closure_m_appuser` FOREIGN KEY (`createdby_id`) REFERENCES `m_appuser` (`id`),
|
||||
CONSTRAINT `FK_acc_gl_closure_m_appuser_2` FOREIGN KEY (`lastmodifiedby_id`) REFERENCES `m_appuser` (`id`),
|
||||
CONSTRAINT `FK_acc_gl_closure_m_office` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`)
|
||||
)
|
||||
COLLATE='utf8_general_ci'
|
||||
ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
@@ -0,0 +1,19 @@
|
||||
|
||||
DROP TABLE IF EXISTS `m_saving_schedule`;
|
||||
CREATE TABLE `m_saving_schedule` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`saving_account_id` bigint(20) NOT NULL,
|
||||
`duedate` date NOT NULL,
|
||||
`installment` smallint(5) NOT NULL,
|
||||
`deposit` decimal(21,4) NOT NULL,
|
||||
`payment_date` date DEFAULT NULL,
|
||||
`deposit_paid` decimal(21,4) DEFAULT NULL,
|
||||
`completed_derived` bit(1) NOT NULL,
|
||||
`createdby_id` bigint(20) DEFAULT NULL,
|
||||
`created_date` datetime DEFAULT NULL,
|
||||
`lastmodified_date` datetime DEFAULT NULL,
|
||||
`lastmodifiedby_id` bigint(20) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `FKSS00000000001` (`saving_account_id`),
|
||||
CONSTRAINT `FKSS00000000001` FOREIGN KEY (`saving_account_id`) REFERENCES `m_saving_account` (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
/* some addition permissions and alterations */
|
||||
INSERT INTO m_permission (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
|
||||
VALUES ('configuration', 'UPDATE_PERMISSION', 'PERMISSION', 'UPDATE', '0');
|
||||
|
||||
INSERT INTO m_permission (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
|
||||
VALUES ('configuration', 'UPDATE_PERMISSION_CHECKER', 'PERMISSION', 'UPDATE', '0');
|
||||
|
||||
INSERT INTO m_permission (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
|
||||
VALUES ('configuration', 'READ_DATATABLE', 'DATATABLE', 'READ', '0');
|
||||
|
||||
INSERT INTO m_permission (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
|
||||
VALUES ('configuration', 'REGISTER_DATATABLE', 'DATATABLE', 'REGISTER', '0');
|
||||
|
||||
INSERT INTO m_permission (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
|
||||
VALUES ('configuration', 'REGISTER_DATATABLE_CHECKER', 'DATATABLE', 'REGISTER', '0');
|
||||
|
||||
INSERT INTO m_permission (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
|
||||
VALUES ('configuration', 'DEREGISTER_DATATABLE', 'DATATABLE', 'DEREGISTER', '0');
|
||||
|
||||
INSERT INTO m_permission (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
|
||||
VALUES ('configuration', 'DEREGISTER_DATATABLE_CHECKER', 'DATATABLE', 'DEREGISTER', '0');
|
||||
|
||||
INSERT INTO m_permission (`grouping`, `code`, `can_maker_checker`)
|
||||
VALUES ('special', 'CHECKER_SUPER_USER', '0');
|
||||
|
||||
|
||||
update m_permission
|
||||
set grouping = 'configuration'
|
||||
where code like '%permission%';
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
|
||||
update m_permission
|
||||
|
||||
set grouping = "authorisation"
|
||||
where code like 'PERMISSIONS_ROLE%';
|
||||
@@ -0,0 +1 @@
|
||||
ALTER TABLE `m_portfolio_command_source` CHANGE COLUMN `api_resource` `api_resource` VARCHAR(100) NOT NULL;
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
ALTER TABLE `m_deposit_account`
|
||||
ADD COLUMN `available_interest` decimal(19,6) DEFAULT '0.000000' AFTER `is_interest_withdrawable`,
|
||||
ADD COLUMN `interest_posted_amount` decimal(19,6) DEFAULT '0.000000' AFTER `available_interest`,
|
||||
ADD COLUMN `last_interest_posted_date` date DEFAULT NULL AFTER `interest_posted_amount`,
|
||||
ADD COLUMN `next_interest_posting_date` date DEFAULT NULL AFTER `last_interest_posted_date`;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE `m_client`
|
||||
CHANGE COLUMN `joining_date` `joined_date` DATE NULL DEFAULT NULL;
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
drop table if exists extra_client_details;
|
||||
|
||||
CREATE TABLE `extra_client_details` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`client_id` bigint(20) NOT NULL,
|
||||
`client_dob` date DEFAULT NULL,
|
||||
`client_address` varchar(60) DEFAULT NULL,
|
||||
`father_name` varchar(40) DEFAULT NULL,
|
||||
`nominee` varchar(40) DEFAULT NULL,
|
||||
`nominee_relationship` varchar(40) DEFAULT NULL,
|
||||
`nominee_address` varchar(60) DEFAULT NULL,
|
||||
`crime_no` varchar(40) DEFAULT NULL,
|
||||
`police_station` varchar(40) DEFAULT NULL,
|
||||
`other_notes` text,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `client_id` (`client_id`),
|
||||
KEY `FK_extra_client_details_1` (`client_id`),
|
||||
CONSTRAINT `FK_extra_client_details` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
@@ -0,0 +1,3 @@
|
||||
|
||||
INSERT INTO m_permission (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
|
||||
VALUES ('configuration', 'READ_AUDIT', 'AUDIT', 'READ', '0');
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
|
||||
drop table if exists `m_portfolio_command_source`;
|
||||
CREATE TABLE `m_portfolio_command_source` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`permission_code` varchar(50) NOT NULL,
|
||||
`api_operation` varchar(30) NOT NULL,
|
||||
`api_resource` varchar(100) NOT NULL,
|
||||
`resource_id` bigint(20) DEFAULT NULL,
|
||||
`api_subresource` varchar(100) DEFAULT NULL,
|
||||
`subresource_id` bigint(20) DEFAULT NULL,
|
||||
`command_as_json` text NOT NULL,
|
||||
`maker_id` bigint(20) NOT NULL,
|
||||
`made_on_date` datetime NOT NULL,
|
||||
`checker_id` bigint(20) DEFAULT NULL,
|
||||
`checked_on_date` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `FK_m_maker_m_appuser` (`maker_id`),
|
||||
KEY `FK_m_checker_m_appuser` (`checker_id`),
|
||||
CONSTRAINT `FK_m_checker_m_appuser` FOREIGN KEY (`checker_id`) REFERENCES `m_appuser` (`id`),
|
||||
CONSTRAINT `FK_m_maker_m_appuser` FOREIGN KEY (`maker_id`) REFERENCES `m_appuser` (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
drop table if exists `m_portfolio_command_source`;
|
||||
CREATE TABLE `m_portfolio_command_source` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`action_name` varchar(50) NOT NULL,
|
||||
`entity_name` varchar(50) NOT NULL,
|
||||
`api_operation` varchar(30) NOT NULL,
|
||||
`api_resource` varchar(100) NOT NULL,
|
||||
`resource_id` bigint(20) DEFAULT NULL,
|
||||
`api_subresource` varchar(100) DEFAULT NULL,
|
||||
`subresource_id` bigint(20) DEFAULT NULL,
|
||||
`command_as_json` text NOT NULL,
|
||||
`maker_id` bigint(20) NOT NULL,
|
||||
`made_on_date` datetime NOT NULL,
|
||||
`checker_id` bigint(20) DEFAULT NULL,
|
||||
`checked_on_date` datetime DEFAULT NULL,
|
||||
`processing_result_enum` smallint(5) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `FK_m_maker_m_appuser` (`maker_id`),
|
||||
KEY `FK_m_checker_m_appuser` (`checker_id`),
|
||||
CONSTRAINT `FK_m_checker_m_appuser` FOREIGN KEY (`checker_id`) REFERENCES `m_appuser` (`id`),
|
||||
CONSTRAINT `FK_m_maker_m_appuser` FOREIGN KEY (`maker_id`) REFERENCES `m_appuser` (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
@@ -0,0 +1,40 @@
|
||||
DROP TABLE IF EXISTS `acc_gl_journal_entry`;
|
||||
|
||||
CREATE TABLE `acc_gl_journal_entry` (
|
||||
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||
`account_id` BIGINT(20) NOT NULL,
|
||||
`office_id` BIGINT(20) NOT NULL,
|
||||
`reversal_id` BIGINT(20) NULL DEFAULT NULL,
|
||||
`transaction_id` VARCHAR(50) NOT NULL,
|
||||
`reversed` TINYINT(1) NOT NULL DEFAULT '0',
|
||||
`portfolio_generated` TINYINT(1) NOT NULL DEFAULT '0',
|
||||
`entry_date` DATE NOT NULL,
|
||||
`type` VARCHAR(50) NOT NULL,
|
||||
`amount` DECIMAL(19,6) NOT NULL,
|
||||
`description` VARCHAR(500) NULL DEFAULT NULL,
|
||||
`entity_type` VARCHAR(50) NULL DEFAULT NULL,
|
||||
`entity_id` BIGINT(20) NULL DEFAULT NULL,
|
||||
`createdby_id` BIGINT(20) NOT NULL,
|
||||
`lastmodifiedby_id` BIGINT(20) NOT NULL,
|
||||
`created_date` DATETIME NOT NULL,
|
||||
`lastmodified_date` DATETIME NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
INDEX `FK_acc_gl_journal_entry_m_office` (`office_id`),
|
||||
INDEX `FK_acc_gl_journal_entry_m_appuser` (`createdby_id`),
|
||||
INDEX `FK_acc_gl_journal_entry_m_appuser_2` (`lastmodifiedby_id`),
|
||||
INDEX `FK_acc_gl_journal_entry_acc_gl_journal_entry` (`reversal_id`),
|
||||
INDEX `FK_acc_gl_journal_entry_acc_gl_account` (`account_id`),
|
||||
CONSTRAINT `FK_acc_gl_journal_entry_acc_gl_account` FOREIGN KEY (`account_id`) REFERENCES `acc_gl_account` (`id`),
|
||||
CONSTRAINT `FK_acc_gl_journal_entry_acc_gl_journal_entry` FOREIGN KEY (`reversal_id`) REFERENCES `acc_gl_journal_entry` (`id`),
|
||||
CONSTRAINT `FK_acc_gl_journal_entry_m_appuser` FOREIGN KEY (`createdby_id`) REFERENCES `m_appuser` (`id`),
|
||||
CONSTRAINT `FK_acc_gl_journal_entry_m_appuser_2` FOREIGN KEY (`lastmodifiedby_id`) REFERENCES `m_appuser` (`id`),
|
||||
CONSTRAINT `FK_acc_gl_journal_entry_m_office` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`)
|
||||
)
|
||||
COLLATE='utf8_general_ci'
|
||||
ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
ALTER TABLE `acc_gl_account`
|
||||
ALTER `description` DROP DEFAULT;
|
||||
ALTER TABLE `acc_gl_account`
|
||||
CHANGE COLUMN `description` `description` VARCHAR(500) NULL AFTER `classification`;
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
/**Balance sheet report**/
|
||||
INSERT INTO `stretchy_report` (`report_name`, `report_type`, `report_subtype`, `report_category`, `report_sql`, `description`, `core_report`, `use_report`) VALUES ('Balance Sheet', 'Pentaho', NULL, 'Accounting', NULL, 'Balance Sheet', 1, 1);
|
||||
INSERT INTO `stretchy_report_parameter` (`report_id`, `parameter_id`, `report_parameter_name`) VALUES ((select max(report_id) from stretchy_report), 5, 'branch');
|
||||
INSERT INTO `stretchy_report_parameter` (`report_id`, `parameter_id`, `report_parameter_name`) VALUES ((select max(report_id) from stretchy_report), 81, 'date');
|
||||
|
||||
/**Income statement report**/
|
||||
INSERT INTO `stretchy_report` (`report_name`, `report_type`, `report_subtype`, `report_category`, `report_sql`, `description`, `core_report`, `use_report`) VALUES ('Income Statement', 'Pentaho', NULL, 'Accounting', NULL, 'Profilt and Loss Statement', 1, 1);
|
||||
INSERT INTO `stretchy_report_parameter` (`report_id`, `parameter_id`, `report_parameter_name`) VALUES ((select max(report_id) from stretchy_report), 5, 'branch');
|
||||
INSERT INTO `stretchy_report_parameter` (`report_id`, `parameter_id`, `report_parameter_name`) VALUES ((select max(report_id) from stretchy_report), 80, 'fromDate');
|
||||
INSERT INTO `stretchy_report_parameter` (`report_id`, `parameter_id`, `report_parameter_name`) VALUES ((select max(report_id) from stretchy_report), 81, 'toDate');
|
||||
|
||||
/**Trial Balance report**/
|
||||
INSERT INTO `stretchy_report` (`report_name`, `report_type`, `report_subtype`, `report_category`, `report_sql`, `description`, `core_report`, `use_report`) VALUES ('Trial Balance', 'Pentaho', NULL, 'Accounting', NULL, 'Trial Balance Report', 1, 1);
|
||||
INSERT INTO `stretchy_report_parameter` (`report_id`, `parameter_id`, `report_parameter_name`) VALUES ((select max(report_id) from stretchy_report), 5, 'branch');
|
||||
INSERT INTO `stretchy_report_parameter` (`report_id`, `parameter_id`, `report_parameter_name`) VALUES ((select max(report_id) from stretchy_report), 80, 'fromDate');
|
||||
INSERT INTO `stretchy_report_parameter` (`report_id`, `parameter_id`, `report_parameter_name`) VALUES ((select max(report_id) from stretchy_report), 81, 'toDate');
|
||||
|
||||
|
||||
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
INSERT INTO r_enum_value(`enum_name`, `enum_id`, `enum_message_property`, `enum_value`) VALUES ('processing_result_enum', '0', 'invalid', 'Invalid');
|
||||
INSERT INTO r_enum_value(`enum_name`, `enum_id`, `enum_message_property`, `enum_value`) VALUES ('processing_result_enum', '1', 'processed', 'Processed');
|
||||
INSERT INTO r_enum_value(`enum_name`, `enum_id`, `enum_message_property`, `enum_value`) VALUES ('processing_result_enum', '2', 'awaiting.approval', 'Awaiting Approval');
|
||||
INSERT INTO r_enum_value(`enum_name`, `enum_id`, `enum_message_property`, `enum_value`) VALUES ('processing_result_enum', '3', 'rejected', 'Rejected');
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE m_product_savings
|
||||
ADD COLUMN `deposit_every` bigint(20) DEFAULT NULL AFTER `tenure_type`;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE m_saving_account
|
||||
ADD COLUMN `deposit_every` bigint(20) DEFAULT NULL AFTER `tenure_type`;
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
|
||||
|
||||
DELETE FROM m_role_permission
|
||||
where exists
|
||||
(select 'f' from m_permission p
|
||||
where p.id = m_role_permission.permission_id
|
||||
and p.code in ("ORGANISATION_ADMINISTRATION_SUPER_USER", "PORTFOLIO_MANAGEMENT_SUPER_USER", "USER_ADMINISTRATION_SUPER_USER"));
|
||||
|
||||
|
||||
DELETE from m_permission
|
||||
where code in ("ORGANISATION_ADMINISTRATION_SUPER_USER", "PORTFOLIO_MANAGEMENT_SUPER_USER", "USER_ADMINISTRATION_SUPER_USER");
|
||||
Reference in New Issue
Block a user