All checks were successful
Build docker and publish / build (20.15.1) (push) Successful in 7m46s
13 lines
512 B
SQL
13 lines
512 B
SQL
-- Revert: remove new_user_only column from subscribe table
|
|
SET @column_exists = (SELECT COUNT(*)
|
|
FROM INFORMATION_SCHEMA.COLUMNS
|
|
WHERE TABLE_SCHEMA = DATABASE()
|
|
AND TABLE_NAME = 'subscribe'
|
|
AND COLUMN_NAME = 'new_user_only');
|
|
SET @sql = IF(@column_exists > 0,
|
|
'ALTER TABLE `subscribe` DROP COLUMN `new_user_only`',
|
|
'SELECT 1');
|
|
PREPARE stmt FROM @sql;
|
|
EXECUTE stmt;
|
|
DEALLOCATE PREPARE stmt;
|