CREATE TABLE FinancialTransactionsDataType
(
    TransactionId BIGINT UNSIGNED DEFAULT NULL,
    AccountId BIGINT UNSIGNED DEFAULT NULL,
    ts BIGINT UNSIGNED DEFAULT NULL,
    Date BIGINT UNSIGNED DEFAULT NULL,
    Reference BIGINT UNSIGNED DEFAULT NULL,
    TotalBeforeTransaction DECIMAL(12,2) DEFAULT NULL,
    Credit DECIMAL(12,2) DEFAULT NULL,
    Debit DECIMAL(12,2) DEFAULT NULL,
    TotalAfterTransaction DECIMAL(12,2) DEFAULT NULL,
    LockId CHAR(32) DEFAULT NULL,
    PRIMARY KEY ( TransactionId ) AUTO_INCREMENT,
    KEY AccountId ( AccountId ),
    KEY Reference ( Reference ),
    KEY ( LockId )

) ENGINE=INNODB CHARSET=UTF8 COMMENT="Double entry ledger";
