log101-dot-dev-services/schema.sql
log101 84547b811a
All checks were successful
/ Build (push) Successful in 2m28s
fix: user can only react one post
2024-05-31 17:45:28 +03:00

14 lines
332 B
SQL

-- schema.sql
CREATE DATABASE IF NOT EXISTS emojis;
USE emojis;
CREATE TABLE IF NOT EXISTS emoji_clicks (
id INT PRIMARY KEY AUTO_INCREMENT,
user_anon_data VARCHAR(50),
post_id VARCHAR(50) NOT NULL,
emoji TEXT NOT NULL,
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
UNIQUE(`post_id`, `user_anon_data`)
);