From 5df9b37c69f490b8f23a94679319aab5ad50bed7 Mon Sep 17 00:00:00 2001 From: Vishwas Babu A J Date: Mon, 12 Aug 2013 22:26:04 +0530 Subject: [PATCH] cleaning up sql file numbers --- ...ettings_for_holiday_and_non_workingday.sql | 2 + .../core_db/V95__batch_job_postInterest.sql | 1 + .../V96__savings_accounts_transfers_table.sql | 56 +++++++++++++++++++ ...mission_for_adjust_savings_transaction.sql | 1 + ..._added_currency_roundof_for_multipleof.sql | 12 ++++ 5 files changed, 72 insertions(+) create mode 100644 mifosng-db/migrations/core_db/V91_1__configuration_settings_for_holiday_and_non_workingday.sql create mode 100644 mifosng-db/migrations/core_db/V95__batch_job_postInterest.sql create mode 100644 mifosng-db/migrations/core_db/V96__savings_accounts_transfers_table.sql create mode 100644 mifosng-db/migrations/core_db/V97__add_permission_for_adjust_savings_transaction.sql create mode 100644 mifosng-db/migrations/core_db/V98__added_currency_roundof_for_multipleof.sql diff --git a/mifosng-db/migrations/core_db/V91_1__configuration_settings_for_holiday_and_non_workingday.sql b/mifosng-db/migrations/core_db/V91_1__configuration_settings_for_holiday_and_non_workingday.sql new file mode 100644 index 000000000..0b84ea2b0 --- /dev/null +++ b/mifosng-db/migrations/core_db/V91_1__configuration_settings_for_holiday_and_non_workingday.sql @@ -0,0 +1,2 @@ +INSERT INTO `c_configuration` (`name`, `enabled`) VALUES ('allow-transactions-on-holiday', 0); +INSERT INTO `c_configuration` (`name`, `enabled`) VALUES ('allow-transactions-on-non_workingday', 0); \ No newline at end of file diff --git a/mifosng-db/migrations/core_db/V95__batch_job_postInterest.sql b/mifosng-db/migrations/core_db/V95__batch_job_postInterest.sql new file mode 100644 index 000000000..58fda9d28 --- /dev/null +++ b/mifosng-db/migrations/core_db/V95__batch_job_postInterest.sql @@ -0,0 +1 @@ +INSERT INTO `job` (`name`, `display_name`, `cron_expression`, `create_time`, `task_priority`, `group_name`, `previous_run_start_time`, `next_run_time`, `job_key`, `initializing_errorlog`, `is_active`, `currently_running`, `updates_allowed`, `scheduler_group`) VALUES ('Post Interest For Savings', 'Post Interest For Savings', '0 0 0 1/1 * ? *', now(), 5, NULL, NULL, NULL, NULL, NULL, 1, 0, 1, 0); diff --git a/mifosng-db/migrations/core_db/V96__savings_accounts_transfers_table.sql b/mifosng-db/migrations/core_db/V96__savings_accounts_transfers_table.sql new file mode 100644 index 000000000..425b17b4a --- /dev/null +++ b/mifosng-db/migrations/core_db/V96__savings_accounts_transfers_table.sql @@ -0,0 +1,56 @@ +INSERT INTO `m_permission` +(`grouping`,`code`,`entity_name`,`action_name`,`can_maker_checker`) +VALUES +('transaction_savings', 'READ_ACCOUNTTRANSFER', 'ACCOUNTTRANSFER', 'READ', 0), +('transaction_savings', 'CREATE_ACCOUNTTRANSFER', 'ACCOUNTTRANSFER', 'CREATE', 1), +('transaction_savings', 'CREATE_ACCOUNTTRANSFER_CHECKER', 'ACCOUNTTRANSFER', 'CREATE', 0); + + +DROP TABLE IF EXISTS `m_savings_account_transfer`; + +CREATE TABLE `m_savings_account_transfer` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `from_office_id` bigint(20) NOT NULL, + `to_office_id` bigint(20) NOT NULL, + `from_client_id` bigint(20) NOT NULL, + `to_client_id` bigint(20) NOT NULL, + `from_savings_account_id` bigint(20) DEFAULT NULL, + `to_savings_account_id` bigint(20) DEFAULT NULL, + `from_loan_account_id` bigint(20) DEFAULT NULL, + `to_loan_account_id` bigint(20) DEFAULT NULL, + `from_savings_transaction_id` bigint(20) DEFAULT NULL, + `from_loan_transaction_id` bigint(20) DEFAULT NULL, + `to_savings_transaction_id` bigint(20) DEFAULT NULL, + `to_loan_transaction_id` bigint(20) DEFAULT NULL, + `is_reversed` tinyint(1) NOT NULL, + `transaction_date` date NOT NULL, + `currency_code` varchar(3) NOT NULL, + `currency_digits` smallint(5) NOT NULL, + `amount` decimal(19,6) NOT NULL, + `description` varchar(200) NOT NULL, + PRIMARY KEY (`id`), + KEY `FKTRAN000000001` (`from_office_id`), + KEY `FKTRAN000000002` (`from_client_id`), + KEY `FKTRAN000000003` (`from_savings_account_id`), + KEY `FKTRAN000000004` (`to_office_id`), + KEY `FKTRAN000000005` (`to_client_id`), + KEY `FKTRAN000000006` (`to_savings_account_id`), + KEY `FKTRAN000000007` (`to_loan_account_id`), + KEY `FKTRAN000000008` (`from_savings_transaction_id`), + KEY `FKTRAN000000009` (`to_savings_transaction_id`), + KEY `FKTRAN000000010` (`to_loan_transaction_id`), + KEY `FKTRAN000000011` (`from_loan_account_id`), + KEY `FKTRAN000000012` (`from_loan_transaction_id`), + CONSTRAINT `FKTRAN000000001` FOREIGN KEY (`from_office_id`) REFERENCES `m_office` (`id`), + CONSTRAINT `FKTRAN000000002` FOREIGN KEY (`from_client_id`) REFERENCES `m_client` (`id`), + CONSTRAINT `FKTRAN000000003` FOREIGN KEY (`from_savings_account_id`) REFERENCES `m_savings_account` (`id`), + CONSTRAINT `FKTRAN000000004` FOREIGN KEY (`to_office_id`) REFERENCES `m_office` (`id`), + CONSTRAINT `FKTRAN000000005` FOREIGN KEY (`to_client_id`) REFERENCES `m_client` (`id`), + CONSTRAINT `FKTRAN000000006` FOREIGN KEY (`to_savings_account_id`) REFERENCES `m_savings_account` (`id`), + CONSTRAINT `FKTRAN000000007` FOREIGN KEY (`to_loan_account_id`) REFERENCES `m_loan` (`id`), + CONSTRAINT `FKTRAN000000008` FOREIGN KEY (`from_savings_transaction_id`) REFERENCES `m_savings_account_transaction` (`id`), + CONSTRAINT `FKTRAN000000009` FOREIGN KEY (`to_savings_transaction_id`) REFERENCES `m_savings_account_transaction` (`id`), + CONSTRAINT `FKTRAN000000010` FOREIGN KEY (`to_loan_transaction_id`) REFERENCES `m_loan_transaction` (`id`), + CONSTRAINT `FKTRAN000000011` FOREIGN KEY (`from_loan_account_id`) REFERENCES `m_loan` (`id`), + CONSTRAINT `FKTRAN000000012` FOREIGN KEY (`from_loan_transaction_id`) REFERENCES `m_loan_transaction` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; \ No newline at end of file diff --git a/mifosng-db/migrations/core_db/V97__add_permission_for_adjust_savings_transaction.sql b/mifosng-db/migrations/core_db/V97__add_permission_for_adjust_savings_transaction.sql new file mode 100644 index 000000000..906bb1497 --- /dev/null +++ b/mifosng-db/migrations/core_db/V97__add_permission_for_adjust_savings_transaction.sql @@ -0,0 +1 @@ +INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('transaction_savings', 'ADJUSTTRANSACTION_SAVINGSACCOUNT', 'SAVINGSACCOUNT', 'ADJUSTTRANSACTION', 0); \ No newline at end of file diff --git a/mifosng-db/migrations/core_db/V98__added_currency_roundof_for_multipleof.sql b/mifosng-db/migrations/core_db/V98__added_currency_roundof_for_multipleof.sql new file mode 100644 index 000000000..571335a04 --- /dev/null +++ b/mifosng-db/migrations/core_db/V98__added_currency_roundof_for_multipleof.sql @@ -0,0 +1,12 @@ +ALTER TABLE `m_savings_account` + ADD COLUMN `currency_multiplesof` SMALLINT(5) NULL AFTER `currency_digits`; +ALTER TABLE `m_savings_product` + ADD COLUMN `currency_multiplesof` SMALLINT(5) NULL AFTER `currency_digits`; +ALTER TABLE `m_loan` + ADD COLUMN `currency_multiplesof` SMALLINT(5) NULL AFTER `currency_digits`; +ALTER TABLE `m_product_loan` + ADD COLUMN `currency_multiplesof` SMALLINT(5) NULL AFTER `currency_digits`; +ALTER TABLE `m_currency` + ADD COLUMN `currency_multiplesof` SMALLINT(5) NULL AFTER `decimal_places`; +ALTER TABLE `m_organisation_currency` + ADD COLUMN `currency_multiplesof` SMALLINT(5) NULL AFTER `decimal_places`; \ No newline at end of file