remove: soft delete

This commit is contained in:
tokumeikoi
2021-07-01 20:06:09 +09:00
parent 0f488540f4
commit b174403a2a
8 changed files with 15 additions and 28 deletions

View File

@ -342,10 +342,9 @@ 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_deleted_at` (`email`,`deleted_at`)
UNIQUE KEY `email` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- 2021-06-30 15:34:40
-- 2021-07-01 11:00:48

View File

@ -412,9 +412,13 @@ 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) NULL AFTER `updated_at`;
ALTER TABLE `v2_user`
ADD UNIQUE `email_deleted_at` (`email`, `deleted_at`),
DROP INDEX `email`;
ALTER TABLE `v2_user`
DROP `deleted_at`;
ALTER TABLE `v2_user`
ADD UNIQUE `email` (`email`),
DROP INDEX `email_deleted_at`;