15 lines
505 B
SQL
15 lines
505 B
SQL
-- Migration: Create dj_shoutouts table
|
|
-- Description: Stores personalized mentions from the DJ to fans.
|
|
|
|
CREATE TABLE IF NOT EXISTS dj_shoutouts (
|
|
id INT AUTO_INCREMENT PRIMARY KEY,
|
|
target_fan_name VARCHAR(255) NOT NULL,
|
|
message TEXT NOT NULL,
|
|
dj_name VARCHAR(255) DEFAULT 'Lili',
|
|
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
|
is_seen TINYINT(1) DEFAULT 0
|
|
);
|
|
|
|
-- Index for faster polling by target name
|
|
CREATE INDEX idx_target_unseen ON dj_shoutouts(target_fan_name, is_seen);
|