mbarnig commited on
Commit
5d9d231
·
verified ·
1 Parent(s): 5497c6b

Upload create_db.sql

Browse files
Files changed (1) hide show
  1. create_db.sql +15 -0
create_db.sql ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ CREATE TABLE IF NOT EXISTS poll_response (
3
+ id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
4
+ poll_type VARCHAR(32) NOT NULL,
5
+ session_uuid CHAR(36) NOT NULL,
6
+ item_index INT NOT NULL,
7
+ item_file VARCHAR(255) NOT NULL,
8
+ choice VARCHAR(64) NOT NULL,
9
+ user_agent VARCHAR(255) DEFAULT NULL,
10
+ ip_hash CHAR(64) DEFAULT NULL,
11
+ created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
12
+ PRIMARY KEY (id),
13
+ KEY idx_poll_item (poll_type, item_index),
14
+ KEY idx_created (created_at)
15
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;