-- model_call_log 补丁脚本
-- 目的：对齐 BaseEntity 字段，避免 MyBatis 查询 create_by / update_by / update_time / version 报错

ALTER TABLE model_call_log
    ADD COLUMN IF NOT EXISTS create_by VARCHAR(64);

ALTER TABLE model_call_log
    ADD COLUMN IF NOT EXISTS update_by VARCHAR(64);

ALTER TABLE model_call_log
    ADD COLUMN IF NOT EXISTS update_time TIMESTAMP;

ALTER TABLE model_call_log
    ADD COLUMN IF NOT EXISTS version INTEGER NOT NULL DEFAULT 1;

COMMENT ON COLUMN model_call_log.create_by IS '创建者';
COMMENT ON COLUMN model_call_log.update_by IS '更新者';
COMMENT ON COLUMN model_call_log.update_time IS '更新时间';
COMMENT ON COLUMN model_call_log.version IS '版本';

