zoneminder/db/zm_update-1.35.9.sql

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
420 B
MySQL
Raw Normal View History

2020-10-03 02:49:59 +08:00
--
-- 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;