update files after server upgrade.

This commit is contained in:
Keith Woodlock
2012-10-01 10:17:40 +01:00
parent 4fc43ced64
commit 2855e56e0f
10 changed files with 0 additions and 0 deletions
@@ -1,4 +0,0 @@
ALTER TABLE `m_note`
ADD COLUMN `deposit_account_id` bigint(20) DEFAULT NULL AFTER `loan_transaction_id`,
ADD KEY `FK_m_note_m_deposit_account` (`deposit_account_id`),
ADD CONSTRAINT `FK_m_note_m_deposit_account` FOREIGN KEY (`deposit_account_id`) REFERENCES `m_deposit_account` (`id`);
@@ -1,9 +0,0 @@
UPDATE `mifostenant-heavensfamily`.`m_loan`
SET
`loan_transaction_strategy_id` = 2
WHERE id > 0;
UPDATE `mifostenant-heavensfamily`.`m_loan`
SET
`term_frequency` = `repay_every` * `number_of_repayments`
WHERE `term_frequency` = 0;
@@ -1,2 +0,0 @@
ALTER TABLE `m_loan`
ADD COLUMN `total_charges_due_at_disbursement_derived` bigint(20) DEFAULT NULL AFTER `interest_rebate_amount`;
@@ -1,13 +0,0 @@
DROP TABLE `m_loan_charge`;
CREATE TABLE `m_loan_charge` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`loan_id` bigint(20) NOT NULL,
`charge_id` bigint(20) NOT NULL,
`charge_time_enum` smallint(5) NOT NULL,
`charge_calculation_enum` smallint(5) NOT NULL,
`amount` decimal(19,6) NOT NULL,
PRIMARY KEY (`id`),
KEY `charge_id` (`charge_id`),
CONSTRAINT `m_loan_charge_ibfk_1` FOREIGN KEY (`charge_id`) REFERENCES `m_charge` (`id`),
CONSTRAINT `m_loan_charge_ibfk_2` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
@@ -1,13 +0,0 @@
ALTER TABLE `m_deposit_account_transaction`
ADD COLUMN `interest` decimal(19,6) NOT NULL AFTER `amount`,
ADD COLUMN `total` decimal(19,6) NOT NULL AFTER `interest`;
ALTER TABLE `m_deposit_account`
ADD COLUMN `interest_paid` decimal(19,6) NOT NULL DEFAULT 0 AFTER `actual_total_amount`,
ADD COLUMN `is_interest_withdrawable` tinyint(1) NOT NULL DEFAULT '0' AFTER `interest_paid`;
ALTER TABLE `m_product_deposit`
ADD COLUMN `is_compounding_interest_allowed` tinyint(1) NOT NULL DEFAULT '0' AFTER `maturity_max_interest_rate`;
ALTER TABLE `m_deposit_account`
ADD COLUMN `is_compounding_interest_allowed` tinyint(1) NOT NULL DEFAULT '0' AFTER `actual_total_amount`;
@@ -1,3 +0,0 @@
ALTER TABLE `m_loan`
DROP COLUMN `total_charges_due_at_disbursement_derived`,
ADD COLUMN `total_charges_due_at_disbursement_derived` decimal(19,6) DEFAULT NULL AFTER `interest_rebate_amount`;
@@ -1,7 +0,0 @@
DROP TABLE IF EXISTS `x_registered_table`;
/* used to link MySql tables to Mifos X application tables for additional data needs */
CREATE TABLE `x_registered_table` (
`registered_table_name` varchar(50) NOT NULL,
`application_table_name` varchar(50) NOT NULL,
PRIMARY KEY (`registered_table_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
@@ -1,2 +0,0 @@
ALTER TABLE `m_loan_transaction`
ADD COLUMN `charges_portion_derived` decimal(19,6) DEFAULT NULL AFTER `interest_waived_derived`;
@@ -1,3 +0,0 @@
alter table m_group add column office_id bigint(20) NOT NULL AFTER id;
update m_group set office_id = 1 WHERE office_id = 0;
alter table m_group add constraint foreign key (`office_id`) references `m_office` (`id`);
@@ -1,10 +0,0 @@
ALTER TABLE `m_loan_charge`
ADD COLUMN `calculation_percentage` decimal(19,6) DEFAULT NULL AFTER `charge_calculation_enum`;
ALTER TABLE `m_loan_charge`
ADD COLUMN `calculation_on_amount` decimal(19,6) DEFAULT NULL AFTER `calculation_percentage`;
ALTER TABLE `m_loan_charge`
ADD COLUMN `amount_paid_derived` decimal(19,6) DEFAULT NULL AFTER `amount`;
ALTER TABLE `m_loan_charge`
ADD COLUMN `amount_outstanding_derived` decimal(19,6) NOT NULL default 0 AFTER `amount_paid_derived`;
ALTER TABLE `m_loan_charge`
ADD COLUMN `is_paid_derived` tinyint(1) NOT NULL default 0 AFTER `amount_outstanding_derived`;