You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ALTERTABLE"copilot_messages" ADD COLUMN IF NOT EXISTS "seq"integer;--> statement-breakpoint
2
2
WITH ordered AS (
3
3
SELECT c."id"AS chat_id, elem.value->>'id'AS message_id, elem.ordAS ord
4
4
FROM"copilot_chats" c
@@ -16,4 +16,4 @@ ranked AS (
16
16
UPDATE"copilot_messages" m SET"seq"=r.seq
17
17
FROM ranked r
18
18
WHERE m."chat_id"=r.chat_idAND m."message_id"=r.message_id;--> statement-breakpoint
19
-
CREATEINDEX "copilot_messages_chat_seq_idx" ON"copilot_messages" USING btree ("chat_id","seq") WHERE"copilot_messages"."deleted_at" IS NULL;
19
+
CREATEINDEXIF NOT EXISTS "copilot_messages_chat_seq_idx"ON"copilot_messages" USING btree ("chat_id","seq") WHERE"copilot_messages"."deleted_at" IS NULL;
0 commit comments