Files
cbsnexora-backend/mifosng-db/patches/patch-0008-saving_product_creation.sql
T

34 lines
1.6 KiB
SQL

DROP TABLE IF EXISTS `m_product_savings`;
CREATE TABLE `m_product_savings` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`name` varchar(100) NOT NULL,
`description` varchar(500) DEFAULT NULL,
`currency_code` varchar(3) DEFAULT NULL,
`currency_digits` smallint(5) DEFAULT NULL,
`interest_rate` decimal(19,6) DEFAULT NULL,
`min_interest_rate` decimal(19,6) DEFAULT NULL,
`max_interest_rate` decimal(19,6) DEFAULT NULL,
`savings_deposit_amount` decimal(19,6) NOT NULL,
`savings_product_type` smallint(5) DEFAULT NULL,
`tenure_type` smallint(5) DEFAULT NULL,
`tenure` int(11) DEFAULT NULL,
`frequency` int(11) DEFAULT NULL,
`interest_type` smallint(5) DEFAULT NULL,
`interest_calculation_method` smallint(5) DEFAULT NULL,
`min_bal_for_withdrawal` decimal(19,6) NOT NULL,
`is_partial_deposit_allowed` tinyint(1) NOT NULL DEFAULT '0',
`is_lock_in_period_allowed` tinyint(1) NOT NULL DEFAULT '0',
`lock_in_period` bigint(20) DEFAULT NULL,
`lock_in_period_type` smallint(5) NOT NULL DEFAULT '1',
`is_deleted` tinyint(1) NOT NULL DEFAULT '0',
`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 `m_appuser` (`id`),
CONSTRAINT `FKJPW0000000000004` FOREIGN KEY (`lastmodifiedby_id`) REFERENCES `m_appuser` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;