add Sessions table

This commit is contained in:
Isaac Connor 2020-10-02 14:49:59 -04:00
parent 2e14d18a13
commit 3e668b43cf
1 changed files with 21 additions and 0 deletions

21
db/zm_update-1.35.9.sql Normal file
View File

@ -0,0 +1,21 @@
--
-- This adds Sessions Table
--
SET @s = (SELECT IF(
(SELECT COUNT(*)
FROM INFORMATION_SCHEMA.TABLES
WHERE table_name = 'Sessions'
AND table_schema = DATABASE()
) > 0,
"SELECT 'Sessions table exists'",
"CREATE TABLE Sessions (
id char(32) not null,
access INT(10) UNSIGNED DEFAULT NULL,
data text,
PRIMARY KEY(id)
) ENGINE=InnoDB;"
));
PREPARE stmt FROM @s;
EXECUTE stmt;