Semaphore/db/migrations/v1.5.0.sql
2016-05-24 10:55:48 +01:00

12 lines
392 B
SQL

CREATE TABLE `session` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`created` datetime NOT NULL,
`last_active` datetime NOT NULL,
`ip` varchar(15) NOT NULL DEFAULT '',
`user_agent` text NOT NULL,
`expired` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `user_id` (`user_id`),
KEY `expired` (`expired`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;