mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-06 03:49:56 +08:00
fix(server): session updated at (#13099)
fix AI-325 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Improved database handling for session update times to ensure more accurate tracking of session activity. * Enhanced migration process to better manage and update session metadata. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
+5
-1
@@ -1,5 +1,9 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE "ai_sessions_metadata" ADD COLUMN "updated_at" TIMESTAMPTZ(3) NOT NULL DEFAULT CURRENT_TIMESTAMP;
|
||||
ALTER TABLE ai_sessions_metadata ADD COLUMN updated_at TIMESTAMPTZ(3);
|
||||
|
||||
UPDATE ai_sessions_metadata SET updated_at = created_at;
|
||||
|
||||
ALTER TABLE ai_sessions_metadata ALTER COLUMN updated_at SET NOT NULL, ALTER COLUMN updated_at SET DEFAULT CURRENT_TIMESTAMP;
|
||||
|
||||
-- DropIndex
|
||||
DROP INDEX IF EXISTS "ai_session_unique_doc_session_idx";
|
||||
Reference in New Issue
Block a user