MIFOSX-43: add database patch.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
ALTER TABLE `m_deposit_account` ADD COLUMN `status_enum` smallint(5) NOT NULL 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;
|
||||
+2
-3
@@ -20,14 +20,13 @@ import org.mifosng.platform.api.commands.DepositAccountCommand;
|
||||
import org.mifosng.platform.client.domain.Client;
|
||||
import org.mifosng.platform.currency.domain.MonetaryCurrency;
|
||||
import org.mifosng.platform.currency.domain.Money;
|
||||
import org.mifosng.platform.infrastructure.AbstractAuditableCustom;
|
||||
import org.mifosng.platform.loan.domain.PeriodFrequencyType;
|
||||
import org.mifosng.platform.savingproduct.domain.DepositProduct;
|
||||
import org.mifosng.platform.user.domain.AppUser;
|
||||
import org.springframework.data.jpa.domain.AbstractPersistable;
|
||||
|
||||
@Entity
|
||||
@Table(name = "m_deposit_account", uniqueConstraints = @UniqueConstraint(name="deposit_acc_external_id", columnNames = { "external_id" }))
|
||||
public class DepositAccount extends AbstractAuditableCustom<AppUser, Long> {
|
||||
public class DepositAccount extends AbstractPersistable<Long> {
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@ManyToOne
|
||||
|
||||
Reference in New Issue
Block a user