From 941a11d593ef3e1c06470ec472505dc1a653d730 Mon Sep 17 00:00:00 2001 From: John Woodlock Date: Tue, 24 Jul 2012 22:29:26 +1000 Subject: [PATCH] add patch for product_savings table and amend ddl for same --- .../0001a-mifos-platform-base-ddl-schema.sql | 16 ++++++++++++++++ .../patch-0004-add-portfolio-product-loan.sql | 15 +++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 mifosng-db/patches-post-multi-tenant/patch-0004-add-portfolio-product-loan.sql diff --git a/mifosng-db/0001a-mifos-platform-base-ddl-schema.sql b/mifosng-db/0001a-mifos-platform-base-ddl-schema.sql index 76ac2aa39..6649d703a 100644 --- a/mifosng-db/0001a-mifos-platform-base-ddl-schema.sql +++ b/mifosng-db/0001a-mifos-platform-base-ddl-schema.sql @@ -15,6 +15,7 @@ DROP TABLE IF EXISTS `portfolio_loan_repayment_schedule`; DROP TABLE IF EXISTS `portfolio_loan`; DROP TABLE IF EXISTS `portfolio_client`; DROP TABLE IF EXISTS `portfolio_product_loan`; +DROP TABLE IF EXISTS `portfolio_product_savings`; -- organisation related tables DROP TABLE IF EXISTS `org_organisation_currency`; DROP TABLE IF EXISTS `org_fund`; @@ -247,6 +248,21 @@ CREATE TABLE `portfolio_product_loan` ( CONSTRAINT `FKAUD0000000000004` FOREIGN KEY (`lastmodifiedby_id`) REFERENCES `admin_appuser` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; +CREATE TABLE `portfolio_product_savings` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name` varchar(100) NOT NULL, + `description` varchar(500) DEFAULT 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 `FKJPW0000000000003` (`createdby_id`), + KEY `FKJPW0000000000004` (`lastmodifiedby_id`), + CONSTRAINT `FKJPW0000000000003` FOREIGN KEY (`createdby_id`) REFERENCES `admin_appuser` (`id`), + CONSTRAINT `FKJPW0000000000004` FOREIGN KEY (`lastmodifiedby_id`) REFERENCES `admin_appuser` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + CREATE TABLE `portfolio_loan` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `external_id` varchar(100) DEFAULT NULL, diff --git a/mifosng-db/patches-post-multi-tenant/patch-0004-add-portfolio-product-loan.sql b/mifosng-db/patches-post-multi-tenant/patch-0004-add-portfolio-product-loan.sql new file mode 100644 index 000000000..2d0f46dcd --- /dev/null +++ b/mifosng-db/patches-post-multi-tenant/patch-0004-add-portfolio-product-loan.sql @@ -0,0 +1,15 @@ +DROP TABLE IF EXISTS `portfolio_product_savings`; +CREATE TABLE `portfolio_product_savings` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name` varchar(100) NOT NULL, + `description` varchar(500) DEFAULT 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 `FKJPW0000000000003` (`createdby_id`), + KEY `FKJPW0000000000004` (`lastmodifiedby_id`), + CONSTRAINT `FKJPW0000000000003` FOREIGN KEY (`createdby_id`) REFERENCES `admin_appuser` (`id`), + CONSTRAINT `FKJPW0000000000004` FOREIGN KEY (`lastmodifiedby_id`) REFERENCES `admin_appuser` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; \ No newline at end of file