Semaphore/db/sql/migrations/v2.3.1.sql

23 lines
495 B
MySQL
Raw Normal View History

2020-11-28 22:49:44 +01:00
alter table session rename to session_backup;
create table session
(
id integer primary key autoincrement,
user_id int not null,
created datetime not null,
last_active datetime not null,
ip varchar(39) default '' not null,
user_agent text not null,
2021-08-24 17:20:34 +02:00
expired boolean default false not null
2020-11-28 22:49:44 +01:00
);
insert into session select * from session_backup;
drop table session_backup;
create index expired
on session (expired);
create index user_id
on session (user_id);