Semaphore/db/sql/migrations/v1.5.0.sql

14 lines
373 B
MySQL
Raw Normal View History

CREATE TABLE `session` (
2020-11-28 22:49:44 +01:00
`id` integer primary key autoincrement,
`user_id` int NOT NULL,
`created` datetime NOT NULL,
`last_active` datetime NOT NULL,
`ip` varchar(15) NOT NULL DEFAULT '',
`user_agent` text NOT NULL,
2021-08-24 17:20:34 +02:00
`expired` boolean NOT NULL DEFAULT false
2020-11-28 22:49:44 +01:00
);
CREATE INDEX `user_id` ON `session`(`user_id`);
CREATE INDEX `expired` ON `session`(`expired`);