update: add user softdelete api

This commit is contained in:
tokumeikoi
2021-07-01 00:35:22 +09:00
parent 044d1e9b7f
commit de6ff1dca9
5 changed files with 25 additions and 2 deletions

View File

@ -342,9 +342,10 @@ CREATE TABLE `v2_user` (
`expired_at` bigint(20) DEFAULT '0',
`created_at` int(11) NOT NULL,
`updated_at` int(11) NOT NULL,
`deleted_at` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `email` (`email`)
UNIQUE KEY `email_deleted_at` (`email`,`deleted_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- 2021-05-06 16:14:04
-- 2021-06-30 15:34:40

View File

@ -411,3 +411,10 @@ ALTER TABLE `v2_order`
ALTER TABLE `v2_payment`
ADD `uuid` char(32) NOT NULL AFTER `id`;
ALTER TABLE `v2_user`
ADD `deleted_at` int(11) NOT NULL AFTER `updated_at`;
ALTER TABLE `v2_user`
ADD UNIQUE `email_deleted_at` (`email`, `deleted_at`),
DROP INDEX `email`;