This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
-- 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;
|
||||
@@ -0,0 +1,12 @@
|
||||
-- Add new_user_only column to 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` ADD COLUMN `new_user_only` tinyint(1) DEFAULT 0 COMMENT ''New user only: allow purchase within 24h of registration, once per user'' AFTER `quota`',
|
||||
'SELECT 1');
|
||||
PREPARE stmt FROM @sql;
|
||||
EXECUTE stmt;
|
||||
DEALLOCATE PREPARE stmt;
|
||||
Reference in New Issue
Block a user