From 3491013c43775401b5e87f97c09d906de5bafbc9 Mon Sep 17 00:00:00 2001
From: Marvin Borner
Date: Wed, 30 Sep 2020 21:01:13 +0200
Subject: Lars is dumb

---
 tables.sql | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

(limited to 'tables.sql')

diff --git a/tables.sql b/tables.sql
index a90c8a9..7cd7268 100644
--- a/tables.sql
+++ b/tables.sql
@@ -1,7 +1,11 @@
+set global innodb_large_prefix = ON;
+
 CREATE TABLE IF NOT EXISTS theme(
     id INTEGER PRIMARY KEY AUTO_INCREMENT,
-    main TEXT NOT NULL UNIQUE,
-    description TEXT NOT NULL UNIQUE,
+    main VARCHAR(255) NOT NULL,
+    description VARCHAR(255) NOT NULL,
     votes INTEGER DEFAULT FALSE,
-    hidden BOOLEAN DEFAULT FALSE
-);
+    hidden BOOLEAN DEFAULT FALSE,
+
+    UNIQUE KEY main (main, description)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- 
cgit v1.2.3

