| 37030 |
amit |
1 |
-- Credit Block / Unblock audit log
|
|
|
2 |
-- Date: 2026-07-07
|
|
|
3 |
-- Records every block (deactivate) / unblock (reactivate) action on a partner's
|
|
|
4 |
-- SD credit account, with the mandatory block reason and who performed it.
|
|
|
5 |
CREATE TABLE IF NOT EXISTS dtr.credit_block_log (
|
|
|
6 |
id BIGINT NOT NULL AUTO_INCREMENT,
|
|
|
7 |
credit_account_id INT NOT NULL,
|
|
|
8 |
fofo_id INT NOT NULL,
|
|
|
9 |
action VARCHAR(10) NOT NULL, -- BLOCK / UNBLOCK
|
|
|
10 |
reason VARCHAR(500) NULL, -- mandatory on BLOCK, optional on UNBLOCK
|
|
|
11 |
performed_by VARCHAR(100) NOT NULL,
|
|
|
12 |
created_on DATETIME NOT NULL,
|
|
|
13 |
PRIMARY KEY (id),
|
|
|
14 |
KEY ix_credit_block_log_fofo (fofo_id, created_on)
|
|
|
15 |
);
|