Add Loan counter for Group and JLG Loan

This commit is contained in:
mifoscontributer
2013-07-03 18:17:21 +05:30
parent 94e11c2dea
commit 9010ae6a80
12 changed files with 406 additions and 152 deletions
@@ -0,0 +1,15 @@
ALTER TABLE `m_client_loan_counter`
ADD COLUMN `group_id` BIGINT(20) NOT NULL AFTER `client_id`,
ADD CONSTRAINT `FK_m_group_loan_counter` FOREIGN KEY (`group_id`) REFERENCES `m_group` (`id`);
RENAME TABLE `m_client_loan_counter` TO `m_loan_counter`;
ALTER TABLE `m_loan_counter`
CHANGE COLUMN `client_id` `client_id` BIGINT(20) NULL DEFAULT NULL AFTER `id`,
CHANGE COLUMN `group_id` `group_id` BIGINT(20) NULL DEFAULT NULL AFTER `client_id`;
ALTER TABLE `m_loan`
ADD COLUMN `loan_counter` SMALLINT NULL DEFAULT NULL AFTER `sync_disbursement_with_meeting`,
ADD COLUMN `loan_product_counter` SMALLINT NULL DEFAULT NULL AFTER `loan_counter`;
DROP TABLE `m_loan_counter`;