add basic charge table

This commit is contained in:
John Woodlock
2012-08-16 12:52:15 +10:00
parent 392be3745c
commit 12b6795188
2 changed files with 51 additions and 14 deletions
@@ -0,0 +1,18 @@
CREATE TABLE `o_charge` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`name` varchar(100) DEFAULT NULL,
`amount` decimal(19,6) NOT NULL,
`createdby_id` bigint(20) DEFAULT NULL,
`created_date` datetime DEFAULT NULL,
`lastmodifiedby_id` bigint(20) DEFAULT NULL,
`lastmodified_date` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
ALTER TABLE `portfolio_product_loan`
ADD COLUMN `charge_id` BIGINT(20) NULL DEFAULT NULL AFTER `fund_id` ,
ADD CONSTRAINT `FK_o_charge` FOREIGN KEY (`charge_id` )
REFERENCES `mifostenant_testddl`.`o_charge` (`id` ) ON DELETE NO ACTION ON UPDATE NO ACTION ,
ADD INDEX `FK_o_charge_idx` (`charge_id` ASC) ;