Subversion Repositories SmartDukaan

Rev

Blame | Last modification | View Log | RSS feed

-- Credit Block / Unblock audit log
-- Date: 2026-07-07
-- Records every block (deactivate) / unblock (reactivate) action on a partner's
-- SD credit account, with the mandatory block reason and who performed it.
CREATE TABLE IF NOT EXISTS dtr.credit_block_log (
    id                BIGINT       NOT NULL AUTO_INCREMENT,
    credit_account_id INT          NOT NULL,
    fofo_id           INT          NOT NULL,
    action            VARCHAR(10)  NOT NULL,   -- BLOCK / UNBLOCK
    reason            VARCHAR(500) NULL,       -- mandatory on BLOCK, optional on UNBLOCK
    performed_by      VARCHAR(100) NOT NULL,
    created_on        DATETIME     NOT NULL,
    PRIMARY KEY (id),
    KEY ix_credit_block_log_fofo (fofo_id, created_on)
);