chore: migrate sql added perm column

This commit is contained in:
wonderlandpark 2021-03-21 01:10:31 +09:00
parent f6f2a1e779
commit 70dde2534a

View File

@ -26,6 +26,7 @@ ALTER TABLE `users` ADD `email` TEXT NULL AFTER `id`;
ALTER TABLE `users` ADD `stared` TEXT NOT NULL DEFAULT '[]';
ALTER TABLE `users` ADD `discord` TEXT NOT NULL AFTER `token`;
UPDATE `users` SET `stared` = `votes` WHERE `id`=`id`;
ALTER TABLE `users` CHANGE `perm` `perm` TEXT NOT NULL DEFAULT 'user';
ALTER TABLE `users` CHANGE `votes` `votes` LONGTEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '{}';
ALTER TABLE `users` CHANGE `avatar` `avatar` MEDIUMTEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL;
UPDATE `users` SET votes="{}";