-- 租户库：lobster_workflow_instance 增加 binding_id（标签模板绑定 ID）
-- 用法：在目标租户库执行；或运行 java/scripts/ApplyLobsterBindingIdMigration.java all

ALTER TABLE lobster_workflow_instance
    ADD COLUMN binding_id BIGINT NULL COMMENT 'tag binding id' AFTER workflow_id;

CREATE INDEX idx_lobster_instance_binding
    ON lobster_workflow_instance (company_id, binding_id, del_flag);
