bb67ebcb79
Build docker and publish / build (20.15.1) (push) Failing after 8m27s
Co-authored-by: multica-agent <github@multica.ai>
7 lines
539 B
SQL
7 lines
539 B
SQL
-- Add activation_context column to order table for Redis fallback persistence (idempotent)
|
|
SET @col_exists = (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'order' AND COLUMN_NAME = 'activation_context');
|
|
SET @sql = IF(@col_exists = 0, 'ALTER TABLE `order` ADD COLUMN `activation_context` TEXT DEFAULT NULL COMMENT ''Activation context JSON (guest/redemption info for DB fallback)'' AFTER `app_account_token`', 'SELECT 1');
|
|
PREPARE stmt FROM @sql;
|
|
EXECUTE stmt;
|
|
DEALLOCATE PREPARE stmt;
|