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
Copy file name to clipboardExpand all lines: apps/backend/prisma/migrations/20260216000000_rename_tab_id_to_session_replay_segment_id/migration.sql
+17Lines changed: 17 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -3,3 +3,20 @@ ALTER TABLE "SessionRecordingChunk" RENAME COLUMN "tabId" TO "sessionReplaySegme
3
3
ALTERTABLE"SessionRecording" RENAME TO "SessionReplay";
4
4
ALTERTABLE"SessionRecordingChunk" RENAME TO "SessionReplayChunk";
5
5
ALTERTABLE"SessionReplayChunk" RENAME COLUMN "sessionRecordingId" TO "sessionReplayId";
6
+
7
+
-- Rename primary key constraints
8
+
ALTERTABLE"SessionReplay" RENAME CONSTRAINT"SessionRecording_pkey" TO "SessionReplay_pkey";
9
+
ALTERTABLE"SessionReplayChunk" RENAME CONSTRAINT"SessionRecordingChunk_pkey" TO "SessionReplayChunk_pkey";
10
+
11
+
-- Rename foreign key constraints
12
+
ALTERTABLE"SessionReplay" RENAME CONSTRAINT"SessionRecording_tenancyId_fkey" TO "SessionReplay_tenancyId_fkey";
13
+
ALTERTABLE"SessionReplay" RENAME CONSTRAINT"SessionRecording_tenancyId_projectUserId_fkey" TO "SessionReplay_tenancyId_projectUserId_fkey";
14
+
ALTERTABLE"SessionReplayChunk" RENAME CONSTRAINT"SessionRecordingChunk_tenancyId_fkey" TO "SessionReplayChunk_tenancyId_fkey";
15
+
ALTERTABLE"SessionReplayChunk" RENAME CONSTRAINT"SessionRecordingChunk_tenancyId_sessionRecordingId_fkey" TO "SessionReplayChunk_tenancyId_sessionReplayId_fkey";
16
+
17
+
-- Rename indexes
18
+
ALTERINDEX"SessionRecording_tenancyId_lastEventAt_idx" RENAME TO "SessionReplay_tenancyId_lastEventAt_idx";
19
+
ALTERINDEX"SessionRecording_tenancyId_projectUserId_startedAt_idx" RENAME TO "SessionReplay_tenancyId_projectUserId_startedAt_idx";
20
+
ALTERINDEX"SessionRecording_tenancyId_refreshTokenId_updatedAt_idx" RENAME TO "SessionReplay_tenancyId_refreshTokenId_updatedAt_idx";
21
+
ALTERINDEX"SessionRecordingChunk_tenancyId_sessionRecordingId_batchId_key" RENAME TO "SessionReplayChunk_tenancyId_sessionReplayId_batchId_key";
22
+
ALTERINDEX"SessionRecordingChunk_tenancyId_sessionRecordingId_createdA_idx" RENAME TO "SessionReplayChunk_tenancyId_sessionReplayId_createdAt_idx";
0 commit comments