mirror of
https://github.com/semaphoreui/semaphore.git
synced 2024-11-25 06:15:56 +01:00
26 lines
564 B
SQL
26 lines
564 B
SQL
-- alter table session change ip ip varchar(39) not null default '';
|
|
|
|
|
|
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,
|
|
expired tinyint default '0' not null
|
|
);
|
|
|
|
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);
|