Files
cbsnexora-backend/mifosng-db/patchesPutOnDemoServer20120902/patch-0002-deposit-account-status-and-transactions-table.sql
T

16 lines
842 B
SQL

ALTER TABLE `m_deposit_account` ADD COLUMN `status_enum` smallint(5) NOT NULL DEFAULT 0 AFTER `is_deleted`;
DROP TABLE IF EXISTS `m_deposit_account_transaction`;
CREATE TABLE `m_deposit_account_transaction` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`deposit_account_id` bigint(20) NOT NULL,
`transaction_type_enum` smallint(5) NOT NULL,
`contra_id` bigint(20) DEFAULT NULL,
`transaction_date` date NOT NULL,
`amount` decimal(19,6) NOT NULL,
PRIMARY KEY (`id`),
KEY `FKKW00000000000005` (`deposit_account_id`),
KEY `FKKW00000000000006` (`contra_id`),
CONSTRAINT `FKKW00000000000005` FOREIGN KEY (`deposit_account_id`) REFERENCES `m_deposit_account` (`id`),
CONSTRAINT `FKKW00000000000006` FOREIGN KEY (`contra_id`) REFERENCES `m_deposit_account_transaction` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;