SET @db = DATABASE();

SET @sql = IF(
    EXISTS(
        SELECT 1 FROM information_schema.COLUMNS
        WHERE TABLE_SCHEMA = @db AND TABLE_NAME = 'gxmu_wxxzx_project' AND COLUMN_NAME = 'promise_signature'
    ),
    'SELECT 1',
    'ALTER TABLE gxmu_wxxzx_project ADD COLUMN promise_signature LONGTEXT NULL COMMENT ''承诺书签名图片(base64)'' AFTER promise_signer'
);
PREPARE stmt FROM @sql;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
