-- Add popup_notice columns to settings table
-- Run this in phpMyAdmin > SQL tab on your existing database

ALTER TABLE `settings`
    ADD COLUMN `popup_enabled` tinyint(1) NOT NULL DEFAULT 1 AFTER `app_version`,
    ADD COLUMN `popup_title` varchar(200) DEFAULT 'Welcome!' AFTER `popup_enabled`,
    ADD COLUMN `popup_message` text DEFAULT 'Join our official Telegram and WhatsApp groups to stay updated!' AFTER `popup_title`,
    ADD COLUMN `popup_button_text` varchar(100) DEFAULT 'Join Now' AFTER `popup_message`,
    ADD COLUMN `popup_button_url` varchar(500) DEFAULT '' AFTER `popup_button_text`,
    ADD COLUMN `popup_image_url` varchar(500) DEFAULT '' AFTER `popup_button_url`;

-- Update existing row with defaults if not already set
UPDATE `settings` SET
    `popup_enabled` = 1,
    `popup_title` = '👋 Welcome to Community Hub!',
    `popup_message` = 'Join our official Telegram channel for exclusive updates, tips, and community discussions. Tap below to join now!',
    `popup_button_text` = '✈️ Join Telegram',
    `popup_button_url` = 'https://t.me/',
    `popup_image_url` = ''
WHERE id = 1;
