@ -26,17 +26,15 @@ CREATE TABLE `users_new` (
` last_login_ip ` text
) ;
- - > statement - breakpoint
INSERT INTO ` users_new ` ( ` id ` , ` username ` , ` email ` , ` nickname ` , ` password ` , ` avatar ` , ` role ` , ` status ` , ` public_slug ` , ` bio_markdown ` , ` bio_visibility ` , ` social_links_json ` , ` avatar_visibility ` , ` discover_visible ` , ` discover_location ` , ` discover_show_location ` , ` created_at ` , ` updated_at ` ) SELECT ` id ` , ` username ` , ` email ` , ` nickname ` , ` password ` , ` avatar ` , ` role ` , ` status ` , ` public_slug ` , ` bio_markdown ` , ` bio_visibility ` , ` social_links_json ` , ` avatar_visibility ` , ` discover_visible ` , ` discover_location ` , ` discover_show_location ` , ` created_at ` , ` updated_at ` FROM ` users ` ;
INSERT INTO ` users_new ` ( ` id ` , ` username ` , ` email ` , ` nickname ` , ` password ` , ` avatar ` , ` role ` , ` status ` , ` public_slug ` , ` bio_markdown ` , ` bio_visibility ` , ` social_links_json ` , ` avatar_visibility ` , ` discover_visible ` , ` discover_location ` , ` discover_show_location ` , ` created_at ` , ` updated_at ` , ` email_verified ` , ` password_history ` , ` failed_login_attempts ` , ` lockout_until ` , ` last_login_at ` , ` last_login_ip ` ) SELECT ` id ` , ` username ` , ` email ` , ` nickname ` , ` password ` , ` avatar ` , ` role ` , ` status ` , ` public_slug ` , ` bio_markdown ` , ` bio_visibility ` , ` social_links_json ` , ` avatar_visibility ` , ` discover_visible ` , ` discover_location ` , ` discover_show_location ` , ` created_at ` , ` updated_at ` , ` email_verified ` , ` password_history ` , ` failed_login_attempts ` , ` lockout_until ` , ` last_login_at ` , ` last_login_ip ` FROM ` users ` ;
- - > statement - breakpoint
DROP TABLE ` users ` ;
- - > statement - breakpoint
ALTER TABLE ` users_new ` RENAME TO ` users ` ;
- - > statement - breakpoint
CREATE UNIQUE INDEX ` users_email_unique ` ON ` users ` ( ` email ` ) ;
- - > statement - breakpoint
CREATE INDEX ` users_email_index ` ON ` users ` ( ` email ` ) ;
-- 2. 创建 user_sessions 表
-- 2. Create user_sessions table
CREATE TABLE ` user_sessions ` (
` id ` text PRIMARY KEY NOT NULL ,
` user_id ` integer NOT NULL ,