fix(ads): add description column only if it does not already exist

This commit is contained in:
Chang lue Tsen 2025-10-18 17:42:02 +09:00
parent 6db4c1b826
commit a15e08d8f3

View File

@ -22,7 +22,7 @@ SET @colname = 'salt';
SET @sql = (
SELECT IF(
COUNT(*) = 0,
'ALTER TABLE `User` ADD COLUMN `salt` VARCHAR(20) NOT NULL DEFAULT ''default'' COMMENT ''Password Salt'' AFTER `algo`;',
'ALTER TABLE `user` ADD COLUMN `salt` VARCHAR(20) NOT NULL DEFAULT ''default'' COMMENT ''Password Salt'' AFTER `algo`;',
'SELECT "Column `salt` already exists";'
)
FROM information_schema.COLUMNS