feat: add account automation and isolated chat
- add account-level auto rating and daily polish tasks\n- add cached historical chat, media, emoji, and per-account realtime sync\n- add SQLite, MySQL, and PostgreSQL migrations and regression coverage\n- align account, sidebar, and chat interfaces with the new workflows
This commit is contained in:
1 parent
d7abbfb2b6
commit
67d7214930
59 files changed
+5202
-211
No files matched your search
@@ -0,0 +1,12 @@
|
||||
-- +goose Up
|
||||
UPDATE chat_messages SET direction='outgoing', sender_name='我'
|
||||
WHERE sender_id=cookie_id AND direction='incoming';
|
||||
UPDATE chat_sessions SET buyer_id=COALESCE((
|
||||
SELECT m.sender_id FROM chat_messages m
|
||||
WHERE m.cookie_id=chat_sessions.cookie_id AND m.chat_id=chat_sessions.chat_id
|
||||
AND m.direction='incoming' AND m.sender_id<>chat_sessions.cookie_id
|
||||
ORDER BY m.sent_at DESC,m.id DESC LIMIT 1
|
||||
), buyer_id);
|
||||
|
||||
-- +goose Down
|
||||
-- Data repair is intentionally irreversible.
|
||||
Reference in new issue
Block a user