log101-dot-dev-services/schema.sql

14 lines
332 B
MySQL
Raw Normal View History

2024-05-17 16:01:33 +00:00
-- schema.sql
2024-05-30 09:52:18 +00:00
CREATE DATABASE IF NOT EXISTS emojis;
USE emojis;
2024-05-17 16:01:33 +00:00
CREATE TABLE IF NOT EXISTS emoji_clicks (
2024-05-28 19:19:30 +00:00
id INT PRIMARY KEY AUTO_INCREMENT,
2024-05-31 14:45:28 +00:00
user_anon_data VARCHAR(50),
post_id VARCHAR(50) NOT NULL,
2024-05-17 16:01:33 +00:00
emoji TEXT NOT NULL,
2024-05-31 14:45:28 +00:00
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
UNIQUE(`post_id`, `user_anon_data`)
2024-05-17 16:01:33 +00:00
);