Semaphore/db/sql/migrations/v2.3.2.sql

18 lines
465 B
MySQL
Raw Normal View History

2020-11-28 22:49:44 +01:00
-- ALTER TABLE `user__token` CHANGE COLUMN `id` `id` VARCHAR(44) NOT NULL;
alter table user__token rename to user__token_backup;
create table user__token
(
id varchar(44) not null primary key,
created datetime not null,
2021-08-24 17:20:34 +02:00
expired boolean default false not null,
2021-10-26 11:36:07 +02:00
user_id int not null,
foreign key (`user_id`) references `user`(`id`) on delete cascade
2020-11-28 22:49:44 +01:00
);
insert into user__token select * from user__token_backup;
drop table user__token_backup;