( ′∀`)σ≡σ☆))Д′)レ(゚∀゚;)ヘ=З=З=Зε≡(ノ´_ゝ`)ノ HEX
HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux mail.thebrand.ai 6.8.0-107-generic #107-Ubuntu SMP PREEMPT_DYNAMIC Fri Mar 13 19:51:50 UTC 2026 x86_64
User: www-data (33)
PHP: 8.3.6
Disabled: NONE
Upload Files
File: /var/www/html/tmpr/../tmpr/../tmpr/../tmpr/../tmpr/../looksy/database/add_ad_generator_table.sql
-- Add ad_generator_saves table for saving user ad configurations
USE looksy_db;

-- Ad Generator Saves table to store saved ad configurations
CREATE TABLE ad_generator_saves (
    save_id INT AUTO_INCREMENT PRIMARY KEY,
    user_id INT NOT NULL,
    ad_name VARCHAR(100) NOT NULL,
    template_id VARCHAR(50) NULL, -- Selected template ID
    template_data JSON NULL, -- Store template information
    style_options JSON NULL, -- Store lighting, background style options
    ad_content JSON NULL, -- Store description, CTA, custom CTA
    brand_colors JSON NULL, -- Store selected brand colors
    generated_ad_image VARCHAR(255) NULL, -- Path to generated ad image
    notes TEXT NULL,
    is_favorite BOOLEAN DEFAULT FALSE,
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    FOREIGN KEY (user_id) REFERENCES users(user_id) ON DELETE CASCADE,
    INDEX idx_user_id (user_id),
    INDEX idx_created_at (created_at),
    INDEX idx_is_favorite (is_favorite)
) ENGINE=InnoDB;