2015-12-15 06:00:04 +08:00
|
|
|
--
|
2015-12-15 06:03:45 +08:00
|
|
|
-- This updates a 1.28.109 database to 1.28.110
|
2015-12-15 06:00:04 +08:00
|
|
|
--
|
|
|
|
|
2015-12-15 06:03:45 +08:00
|
|
|
SET @s = (SELECT IF(
|
2015-12-31 23:14:20 +08:00
|
|
|
(SELECT COUNT(*)
|
|
|
|
FROM INFORMATION_SCHEMA.COLUMNS
|
|
|
|
WHERE table_name = 'Logs'
|
|
|
|
AND table_schema = DATABASE()
|
|
|
|
AND column_name = 'ServerId'
|
|
|
|
) > 0,
|
|
|
|
"SELECT 'Column ServerId already exists in Logs'",
|
|
|
|
"ALTER TABLE `Logs` ADD COLUMN `ServerId` int(10) unsigned AFTER Component"
|
2015-12-16 01:09:11 +08:00
|
|
|
));
|
|
|
|
|
|
|
|
PREPARE stmt FROM @s;
|
|
|
|
EXECUTE stmt;
|