From e32738ca5942a70f822c052aa959925d9fab334c Mon Sep 17 00:00:00 2001 From: Charvisree Koripella Date: Thu, 16 Apr 2026 00:58:57 -0500 Subject: [PATCH 1/9] Deleted the old attendence toggles --- app/components/Notes.vue | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/app/components/Notes.vue b/app/components/Notes.vue index 692886c..13de5af 100644 --- a/app/components/Notes.vue +++ b/app/components/Notes.vue @@ -547,7 +547,6 @@ method: 'POST', body: { content: savedContent, - attended: !isAbsent.value, }, })) as { id: string; createdAt: string } @@ -584,7 +583,6 @@ //Auto-save and status tracking const saveStatus = ref<'idle' | 'saving' | 'saved' | 'error'>('idle') - const isAbsent = ref(false) const lastSaved = ref(null) //Auto-save and status tracking for previous notes @@ -992,28 +990,12 @@ - - - - - + @@ -1107,9 +1089,9 @@ @click.self="showSaveModal = false" >
-

Save Note

+

Submit Note

- Are you sure you want to save this note? + Are you sure you want to submit this note?

- - + + + { content?: string reason?: string signature?: string + attendanceStatus?: string }>(event) if (!body?.content || typeof body.content !== 'string' || !body.content.trim()) { @@ -41,13 +42,18 @@ export default defineEventHandler(async (event) => { data: { sessionNoteId: note.id, originalContent: note.content, + editedContent: body.content.trim(), + oldAttendanceStatus: note.attendanceStatus, + newAttendanceStatus: body.attendanceStatus ?? note.attendanceStatus, reason: body.reason.trim(), signature: body.signature.trim(), }, }), prisma.sessionNote.update({ where: { id: note.id }, - data: { content: body.content.trim() }, + data: { content: body.content.trim(), + ...(body.attendanceStatus && { attendanceStatus: body.attendanceStatus }), + }, }), ]) From 442345807efe09f1b5d28d4da1912c0fcb040ac4 Mon Sep 17 00:00:00 2001 From: Charvisree Koripella Date: Thu, 23 Apr 2026 10:09:35 -0500 Subject: [PATCH 6/9] Fixed the attendance on notes edit and viewer --- app/components/Notes.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/components/Notes.vue b/app/components/Notes.vue index e0fcaaf..dcdf7ad 100644 --- a/app/components/Notes.vue +++ b/app/components/Notes.vue @@ -370,7 +370,7 @@ // Load current attendance status into the edit form const sn = localSessionNotes.value.find(n => n.id === sd.id) - editingAttendanceStatus.value = sn?.attendanceStatus ?? 'show' + editingAttendanceStatus.value = sn?.attendanceStatus ?? '' } else { pendingMeta.value.set(sd.id, { reason: editReason.value, @@ -586,6 +586,7 @@ id: response.id, createdAt: response.createdAt, content: savedContent, + attendanceStatus: attendanceStatus.value, }) // Clear editor → fresh current note From 2e0867aae4be45e7c3168736ddb3964b35cca1bc Mon Sep 17 00:00:00 2001 From: Charvisree Koripella Date: Sun, 26 Apr 2026 17:06:48 -0500 Subject: [PATCH 7/9] Changed to the justification modal and added a checkbox list --- app/components/Notes.vue | 98 +++++++++++---------------------- app/components/NotesToolbar.vue | 27 +-------- app/pages/notes-test.vue | 8 +++ nuxt.config.ts | 8 +++ 4 files changed, 50 insertions(+), 91 deletions(-) diff --git a/app/components/Notes.vue b/app/components/Notes.vue index dcdf7ad..66cd36a 100644 --- a/app/components/Notes.vue +++ b/app/components/Notes.vue @@ -1,6 +1,8 @@ @@ -69,24 +58,14 @@ const items: EditorToolbarItem[][] = [ v-model="localContent" :content-type="contentType || 'markdown'" placeholder="Start typing your clinical notes here..." - class="flex-1 prose prose-sm sm:prose text-left dark:prose-invert" - :class="sizeClassMap[selectedSize]" + class="flex flex-col flex-1 min-h-0 prose prose-sm sm:prose text-left dark:prose-invert" > - - diff --git a/app/pages/notes-test.vue b/app/pages/notes-test.vue index 98eade7..fc3bb7f 100644 --- a/app/pages/notes-test.vue +++ b/app/pages/notes-test.vue @@ -31,6 +31,14 @@ return clientPickerOptions.value[0]?.id ?? '' }) + type NotesEditorData = { + client: { id: string; name: string } + currentNote: { id: number; date: string; content: string } + previousNotes: { id: number; date: string; preview: string; content: string }[] + sessionNotes: { id: string; content: string; createdAt: string }[] + forms: { label?: string; status: 'complete' | 'pending' }[] + } + const { data, pending, error } = await useFetch( () => `/api/clients/${clientId.value}/notes-editor-data`, { diff --git a/nuxt.config.ts b/nuxt.config.ts index 8f578a6..051867c 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -41,5 +41,13 @@ export default defineNuxtConfig({ 'prosemirror-transform', ], }, + optimizeDeps: { + include: [ + '@vue/devtools-core', + '@vue/devtools-kit', + 'better-auth/vue', + 'better-auth/client/plugins', + ] + }, }, }) From 8f5e10f96c84469ed370fc715c4c101175b5aa5a Mon Sep 17 00:00:00 2001 From: Charvisree Koripella Date: Sun, 26 Apr 2026 17:27:29 -0500 Subject: [PATCH 8/9] checkbox list on notes toolbar --- app/assets/css/main.css | 35 +++++++++++++++++++++++++++++++++ app/components/NotesToolbar.vue | 14 ++++++++++++- 2 files changed, 48 insertions(+), 1 deletion(-) diff --git a/app/assets/css/main.css b/app/assets/css/main.css index 16bfeb1..ca8d126 100644 --- a/app/assets/css/main.css +++ b/app/assets/css/main.css @@ -222,4 +222,39 @@ .tiptap p.is-empty:not(:first-child)::before { content: none; +} + +/* Style tiptap task list checkboxes to match Nuxt UI */ +.tiptap ul[data-type="taskList"] { + list-style: none; + padding-left: 0; +} + +.tiptap ul[data-type="taskList"] li { + display: flex; + align-items: flex-start; + gap: 0.5rem; +} + +.tiptap ul[data-type="taskList"] li > label { + margin-top: 2px; + flex-shrink: 0; +} + +.tiptap ul[data-type="taskList"] li > label input[type="checkbox"] { + width: 1rem; + height: 1rem; + border-radius: 4px; + border: 1.5px solid #d1d5db; + cursor: pointer; + accent-color: var(--color-primary-500); +} + +.tiptap ul[data-type="taskList"] li > div { + flex: 1; +} + +.tiptap ul[data-type="taskList"] li[data-checked="true"] > div { + text-decoration: line-through; + color: #9ca3af; } \ No newline at end of file diff --git a/app/components/NotesToolbar.vue b/app/components/NotesToolbar.vue index 0d6bb2a..9b7f03c 100644 --- a/app/components/NotesToolbar.vue +++ b/app/components/NotesToolbar.vue @@ -1,5 +1,6 @@ @@ -66,6 +67,17 @@ const items: EditorToolbarItem[][] = [ layout="fixed" class="w-full border-b bg-gray-50 dark:bg-gray-800 flex-shrink-0 sticky top-0 z-10" > + From def62f8545c0b569f7553da607789fe530e90790 Mon Sep 17 00:00:00 2001 From: Charvisree Koripella Date: Sun, 26 Apr 2026 21:53:12 -0500 Subject: [PATCH 9/9] Fixed all the merge conflicts and errors that came --- .../20260127013856_init/migration.sql | 66 ---- .../migrations/20260314154429/migration.sql | 374 ------------------ .../migration.sql | 147 ------- .../migration.sql | 28 -- .../migration.sql | 52 --- .../migration.sql | 194 --------- prisma/migrations/migration_lock.toml | 3 - 7 files changed, 864 deletions(-) delete mode 100644 prisma/migrations/20260127013856_init/migration.sql delete mode 100644 prisma/migrations/20260314154429/migration.sql delete mode 100644 prisma/migrations/20260402034332_consolidate_notes_and_split_schemas/migration.sql delete mode 100644 prisma/migrations/20260402035909_remove_dynamic_forms/migration.sql delete mode 100644 prisma/migrations/20260402041509_hardcode_ace_form/migration.sql delete mode 100644 prisma/migrations/20260426215909_add_client_clinician_user_id/migration.sql delete mode 100644 prisma/migrations/migration_lock.toml diff --git a/prisma/migrations/20260127013856_init/migration.sql b/prisma/migrations/20260127013856_init/migration.sql deleted file mode 100644 index b547781..0000000 --- a/prisma/migrations/20260127013856_init/migration.sql +++ /dev/null @@ -1,66 +0,0 @@ --- CreateTable -CREATE TABLE "user" ( - "id" TEXT NOT NULL PRIMARY KEY, - "name" TEXT NOT NULL, - "email" TEXT NOT NULL, - "emailVerified" BOOLEAN NOT NULL DEFAULT false, - "image" TEXT, - "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" DATETIME NOT NULL -); - --- CreateTable -CREATE TABLE "session" ( - "id" TEXT NOT NULL PRIMARY KEY, - "expiresAt" DATETIME NOT NULL, - "token" TEXT NOT NULL, - "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" DATETIME NOT NULL, - "ipAddress" TEXT, - "userAgent" TEXT, - "userId" TEXT NOT NULL, - CONSTRAINT "session_userId_fkey" FOREIGN KEY ("userId") REFERENCES "user" ("id") ON DELETE CASCADE ON UPDATE CASCADE -); - --- CreateTable -CREATE TABLE "account" ( - "id" TEXT NOT NULL PRIMARY KEY, - "accountId" TEXT NOT NULL, - "providerId" TEXT NOT NULL, - "userId" TEXT NOT NULL, - "accessToken" TEXT, - "refreshToken" TEXT, - "idToken" TEXT, - "accessTokenExpiresAt" DATETIME, - "refreshTokenExpiresAt" DATETIME, - "scope" TEXT, - "password" TEXT, - "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" DATETIME NOT NULL, - CONSTRAINT "account_userId_fkey" FOREIGN KEY ("userId") REFERENCES "user" ("id") ON DELETE CASCADE ON UPDATE CASCADE -); - --- CreateTable -CREATE TABLE "verification" ( - "id" TEXT NOT NULL PRIMARY KEY, - "identifier" TEXT NOT NULL, - "value" TEXT NOT NULL, - "expiresAt" DATETIME NOT NULL, - "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" DATETIME NOT NULL -); - --- CreateIndex -CREATE UNIQUE INDEX "user_email_key" ON "user"("email"); - --- CreateIndex -CREATE INDEX "session_userId_idx" ON "session"("userId"); - --- CreateIndex -CREATE UNIQUE INDEX "session_token_key" ON "session"("token"); - --- CreateIndex -CREATE INDEX "account_userId_idx" ON "account"("userId"); - --- CreateIndex -CREATE INDEX "verification_identifier_idx" ON "verification"("identifier"); diff --git a/prisma/migrations/20260314154429/migration.sql b/prisma/migrations/20260314154429/migration.sql deleted file mode 100644 index 57888dd..0000000 --- a/prisma/migrations/20260314154429/migration.sql +++ /dev/null @@ -1,374 +0,0 @@ --- CreateTable -CREATE TABLE "client" ( - "id" TEXT NOT NULL PRIMARY KEY, - "userId" TEXT NOT NULL, - "status" TEXT NOT NULL DEFAULT 'INCOMPLETE', - "therapyWeek" INTEGER, - "missedSessions" INTEGER NOT NULL DEFAULT 0, - CONSTRAINT "client_userId_fkey" FOREIGN KEY ("userId") REFERENCES "user" ("id") ON DELETE CASCADE ON UPDATE CASCADE -); - --- CreateTable -CREATE TABLE "client_permission" ( - "id" TEXT NOT NULL PRIMARY KEY, - "clientId" TEXT NOT NULL, - "canViewScores" BOOLEAN NOT NULL DEFAULT false, - "canViewNotes" BOOLEAN NOT NULL DEFAULT false, - "canViewPlan" BOOLEAN NOT NULL DEFAULT false, - CONSTRAINT "client_permission_clientId_fkey" FOREIGN KEY ("clientId") REFERENCES "client" ("id") ON DELETE CASCADE ON UPDATE CASCADE -); - --- CreateTable -CREATE TABLE "session_note" ( - "id" TEXT NOT NULL PRIMARY KEY, - "clientId" TEXT NOT NULL, - "content" TEXT NOT NULL, - "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, - CONSTRAINT "session_note_clientId_fkey" FOREIGN KEY ("clientId") REFERENCES "client" ("id") ON DELETE CASCADE ON UPDATE CASCADE -); - --- CreateTable -CREATE TABLE "client_plan" ( - "id" TEXT NOT NULL PRIMARY KEY, - "clientId" TEXT NOT NULL, - "content" TEXT NOT NULL DEFAULT '', - "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" DATETIME NOT NULL, - CONSTRAINT "client_plan_clientId_fkey" FOREIGN KEY ("clientId") REFERENCES "client" ("id") ON DELETE CASCADE ON UPDATE CASCADE -); - --- CreateTable -CREATE TABLE "form" ( - "id" TEXT NOT NULL PRIMARY KEY, - "title" TEXT NOT NULL, - "description" TEXT, - "slug" TEXT NOT NULL, - "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" DATETIME NOT NULL -); - --- CreateTable -CREATE TABLE "question" ( - "id" TEXT NOT NULL PRIMARY KEY, - "text" TEXT NOT NULL, - "type" TEXT NOT NULL, - "alias" TEXT NOT NULL, - "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" DATETIME NOT NULL -); - --- CreateTable -CREATE TABLE "form_question" ( - "id" TEXT NOT NULL PRIMARY KEY, - "formId" TEXT NOT NULL, - "questionId" TEXT NOT NULL, - "order" INTEGER NOT NULL, - CONSTRAINT "form_question_questionId_fkey" FOREIGN KEY ("questionId") REFERENCES "question" ("id") ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT "form_question_formId_fkey" FOREIGN KEY ("formId") REFERENCES "form" ("id") ON DELETE CASCADE ON UPDATE CASCADE -); - --- CreateTable -CREATE TABLE "form_assignment" ( - "id" TEXT NOT NULL PRIMARY KEY, - "userId" TEXT NOT NULL, - "formId" TEXT NOT NULL, - "assignedAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, - "completedAt" DATETIME, - CONSTRAINT "form_assignment_formId_fkey" FOREIGN KEY ("formId") REFERENCES "form" ("id") ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT "form_assignment_userId_fkey" FOREIGN KEY ("userId") REFERENCES "user" ("id") ON DELETE CASCADE ON UPDATE CASCADE -); - --- CreateTable -CREATE TABLE "ace_response" ( - "id" TEXT NOT NULL PRIMARY KEY, - "userId" TEXT NOT NULL, - "responses" TEXT NOT NULL, - "completedAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, - CONSTRAINT "ace_response_userId_fkey" FOREIGN KEY ("userId") REFERENCES "user" ("id") ON DELETE CASCADE ON UPDATE CASCADE -); - --- CreateTable -CREATE TABLE "AppForm" ( - "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - "userId" TEXT NOT NULL, - "status" TEXT NOT NULL DEFAULT 'IN_PROGRESS', - "submittedAt" DATETIME, - CONSTRAINT "AppForm_userId_fkey" FOREIGN KEY ("userId") REFERENCES "user" ("id") ON DELETE CASCADE ON UPDATE CASCADE -); - --- CreateTable -CREATE TABLE "AppQuestion" ( - "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - "formId" INTEGER NOT NULL, - "userId" TEXT NOT NULL, - "q01" TEXT, - "q02" TEXT, - "q03" TEXT, - "q04" TEXT, - "q05" TEXT, - "q06" TEXT, - "q07" TEXT, - "q08" TEXT, - "q09" TEXT, - "q10" TEXT, - "q11" TEXT, - "q12" TEXT, - "q13" TEXT, - "q14" TEXT, - "q15" TEXT, - "q16" TEXT, - "q17" TEXT, - "q18" TEXT, - "q19" TEXT, - "q20" TEXT, - "q21" TEXT, - "q22" TEXT, - "q23" TEXT, - "q24" TEXT, - "q25" TEXT, - "q26" TEXT, - "q27" TEXT, - "q28" TEXT, - "q29" TEXT, - "q30" TEXT, - "q31" TEXT, - "q32" TEXT, - "q33" TEXT, - "q34" TEXT, - "q35" TEXT, - "q36" TEXT, - "q37" TEXT, - "q38" TEXT, - "q39" TEXT, - "q40" TEXT, - "q41" TEXT, - "q42" TEXT, - "q43" TEXT, - "q44" TEXT, - "q45" TEXT, - "q46" TEXT, - "q47" TEXT, - "q48" TEXT, - "q49" TEXT, - "q50" TEXT, - CONSTRAINT "AppQuestion_userId_fkey" FOREIGN KEY ("userId") REFERENCES "user" ("id") ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT "AppQuestion_formId_fkey" FOREIGN KEY ("formId") REFERENCES "AppForm" ("id") ON DELETE CASCADE ON UPDATE CASCADE -); - --- CreateTable -CREATE TABLE "GadForm" ( - "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - "userId" TEXT NOT NULL, - "status" TEXT NOT NULL DEFAULT 'IN_PROGRESS', - "totalScore" INTEGER, - "severity" TEXT, - "submittedAt" DATETIME, - CONSTRAINT "GadForm_userId_fkey" FOREIGN KEY ("userId") REFERENCES "user" ("id") ON DELETE CASCADE ON UPDATE CASCADE -); - --- CreateTable -CREATE TABLE "GadQuestion" ( - "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - "formId" INTEGER NOT NULL, - "userId" TEXT NOT NULL, - "g01" INTEGER, - "g02" INTEGER, - "g03" INTEGER, - "g04" INTEGER, - "g05" INTEGER, - "g06" INTEGER, - "g07" INTEGER, - "g08" INTEGER, - CONSTRAINT "GadQuestion_userId_fkey" FOREIGN KEY ("userId") REFERENCES "user" ("id") ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT "GadQuestion_formId_fkey" FOREIGN KEY ("formId") REFERENCES "GadForm" ("id") ON DELETE CASCADE ON UPDATE CASCADE -); - --- CreateTable -CREATE TABLE "PhqForm" ( - "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - "userId" TEXT NOT NULL, - "status" TEXT NOT NULL DEFAULT 'IN_PROGRESS', - "totalScore" INTEGER, - "submittedAt" DATETIME, - "severity" TEXT, - CONSTRAINT "PhqForm_userId_fkey" FOREIGN KEY ("userId") REFERENCES "user" ("id") ON DELETE CASCADE ON UPDATE CASCADE -); - --- CreateTable -CREATE TABLE "PhqQuestion" ( - "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - "formId" INTEGER NOT NULL, - "userId" TEXT NOT NULL, - "q1" INTEGER, - "q2" INTEGER, - "q3" INTEGER, - "q4" INTEGER, - "q5" INTEGER, - "q6" INTEGER, - "q7" INTEGER, - "q8" INTEGER, - "q9" INTEGER, - "q10" INTEGER, - CONSTRAINT "PhqQuestion_userId_fkey" FOREIGN KEY ("userId") REFERENCES "user" ("id") ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT "PhqQuestion_formId_fkey" FOREIGN KEY ("formId") REFERENCES "PhqForm" ("id") ON DELETE CASCADE ON UPDATE CASCADE -); - --- CreateTable -CREATE TABLE "PclForm" ( - "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - "userId" TEXT NOT NULL, - "status" TEXT NOT NULL DEFAULT 'IN_PROGRESS', - "submittedAt" DATETIME, - "severity" TEXT, - "totalScore" INTEGER, - CONSTRAINT "PclForm_userId_fkey" FOREIGN KEY ("userId") REFERENCES "user" ("id") ON DELETE CASCADE ON UPDATE CASCADE -); - --- CreateTable -CREATE TABLE "PclQuestion" ( - "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - "formId" INTEGER NOT NULL, - "userId" TEXT NOT NULL, - "q01" INTEGER, - "q02" INTEGER, - "q03" INTEGER, - "q04" INTEGER, - "q05" INTEGER, - "q06" INTEGER, - "q07" INTEGER, - "q08" INTEGER, - "q09" INTEGER, - "q10" INTEGER, - "q11" INTEGER, - "q12" INTEGER, - "q13" INTEGER, - "q14" INTEGER, - "q15" INTEGER, - "q16" INTEGER, - "q17" INTEGER, - "q18" INTEGER, - "q19" INTEGER, - "q20" INTEGER, - CONSTRAINT "PclQuestion_userId_fkey" FOREIGN KEY ("userId") REFERENCES "user" ("id") ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT "PclQuestion_formId_fkey" FOREIGN KEY ("formId") REFERENCES "PclForm" ("id") ON DELETE CASCADE ON UPDATE CASCADE -); - --- CreateTable -CREATE TABLE "change_audit" ( - "id" TEXT NOT NULL PRIMARY KEY, - "entityType" TEXT NOT NULL, - "entityId" TEXT NOT NULL, - "oldValue" TEXT, - "newValue" TEXT, - "reasoning" TEXT, - "documentationBase64" TEXT, - "signatureData" TEXT NOT NULL, - "signedById" TEXT NOT NULL, - "signedAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, - CONSTRAINT "change_audit_signedById_fkey" FOREIGN KEY ("signedById") REFERENCES "user" ("id") ON DELETE CASCADE ON UPDATE CASCADE -); - --- RedefineTables -PRAGMA defer_foreign_keys=ON; -PRAGMA foreign_keys=OFF; -CREATE TABLE "new_user" ( - "id" TEXT NOT NULL PRIMARY KEY, - "name" TEXT NOT NULL, - "email" TEXT NOT NULL, - "emailVerified" BOOLEAN NOT NULL DEFAULT false, - "image" TEXT, - "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" DATETIME NOT NULL, - "role" TEXT NOT NULL DEFAULT 'CLIENT', - "phoneNumber" INTEGER -); -INSERT INTO "new_user" ("createdAt", "email", "emailVerified", "id", "image", "name", "updatedAt") SELECT "createdAt", "email", "emailVerified", "id", "image", "name", "updatedAt" FROM "user"; -DROP TABLE "user"; -ALTER TABLE "new_user" RENAME TO "user"; -CREATE UNIQUE INDEX "user_email_key" ON "user"("email"); -PRAGMA foreign_keys=ON; -PRAGMA defer_foreign_keys=OFF; - --- CreateIndex -CREATE UNIQUE INDEX "client_userId_key" ON "client"("userId"); - --- CreateIndex -CREATE INDEX "client_status_idx" ON "client"("status"); - --- CreateIndex -CREATE UNIQUE INDEX "client_permission_clientId_key" ON "client_permission"("clientId"); - --- CreateIndex -CREATE INDEX "session_note_clientId_idx" ON "session_note"("clientId"); - --- CreateIndex -CREATE UNIQUE INDEX "client_plan_clientId_key" ON "client_plan"("clientId"); - --- CreateIndex -CREATE UNIQUE INDEX "form_slug_key" ON "form"("slug"); - --- CreateIndex -CREATE UNIQUE INDEX "question_alias_key" ON "question"("alias"); - --- CreateIndex -CREATE INDEX "form_question_formId_idx" ON "form_question"("formId"); - --- CreateIndex -CREATE INDEX "form_question_questionId_idx" ON "form_question"("questionId"); - --- CreateIndex -CREATE UNIQUE INDEX "form_question_formId_questionId_key" ON "form_question"("formId", "questionId"); - --- CreateIndex -CREATE INDEX "form_assignment_userId_idx" ON "form_assignment"("userId"); - --- CreateIndex -CREATE INDEX "form_assignment_formId_idx" ON "form_assignment"("formId"); - --- CreateIndex -CREATE UNIQUE INDEX "form_assignment_userId_formId_key" ON "form_assignment"("userId", "formId"); - --- CreateIndex -CREATE INDEX "ace_response_userId_idx" ON "ace_response"("userId"); - --- CreateIndex -CREATE UNIQUE INDEX "AppForm_userId_key" ON "AppForm"("userId"); - --- CreateIndex -CREATE UNIQUE INDEX "AppQuestion_formId_key" ON "AppQuestion"("formId"); - --- CreateIndex -CREATE INDEX "AppQuestion_userId_idx" ON "AppQuestion"("userId"); - --- CreateIndex -CREATE INDEX "GadForm_userId_idx" ON "GadForm"("userId"); - --- CreateIndex -CREATE UNIQUE INDEX "GadQuestion_formId_key" ON "GadQuestion"("formId"); - --- CreateIndex -CREATE INDEX "GadQuestion_userId_idx" ON "GadQuestion"("userId"); - --- CreateIndex -CREATE UNIQUE INDEX "PhqForm_userId_key" ON "PhqForm"("userId"); - --- CreateIndex -CREATE INDEX "PhqForm_userId_idx" ON "PhqForm"("userId"); - --- CreateIndex -CREATE UNIQUE INDEX "PhqQuestion_formId_key" ON "PhqQuestion"("formId"); - --- CreateIndex -CREATE INDEX "PhqQuestion_userId_idx" ON "PhqQuestion"("userId"); - --- CreateIndex -CREATE INDEX "PclForm_userId_idx" ON "PclForm"("userId"); - --- CreateIndex -CREATE UNIQUE INDEX "PclQuestion_formId_key" ON "PclQuestion"("formId"); - --- CreateIndex -CREATE INDEX "PclQuestion_userId_idx" ON "PclQuestion"("userId"); - --- CreateIndex -CREATE INDEX "change_audit_entityType_entityId_idx" ON "change_audit"("entityType", "entityId"); diff --git a/prisma/migrations/20260402034332_consolidate_notes_and_split_schemas/migration.sql b/prisma/migrations/20260402034332_consolidate_notes_and_split_schemas/migration.sql deleted file mode 100644 index e59221e..0000000 --- a/prisma/migrations/20260402034332_consolidate_notes_and_split_schemas/migration.sql +++ /dev/null @@ -1,147 +0,0 @@ -/* - Warnings: - - - You are about to drop the column `documentationBase64` on the `change_audit` table. All the data in the column will be lost. - -*/ --- AlterTable -ALTER TABLE "PclQuestion" ADD COLUMN "worstEvent" TEXT; - --- CreateTable -CREATE TABLE "Appointment" ( - "id" TEXT NOT NULL PRIMARY KEY, - "clientId" TEXT NOT NULL, - "adminId" TEXT NOT NULL, - "title" TEXT NOT NULL, - "description" TEXT, - "startTime" DATETIME NOT NULL, - "endTime" DATETIME NOT NULL, - "status" TEXT NOT NULL DEFAULT 'SCHEDULED', - "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" DATETIME NOT NULL, - CONSTRAINT "Appointment_clientId_fkey" FOREIGN KEY ("clientId") REFERENCES "user" ("id") ON DELETE RESTRICT ON UPDATE CASCADE, - CONSTRAINT "Appointment_adminId_fkey" FOREIGN KEY ("adminId") REFERENCES "user" ("id") ON DELETE RESTRICT ON UPDATE CASCADE -); - --- CreateTable -CREATE TABLE "PhysicianStatementForm" ( - "id" TEXT NOT NULL PRIMARY KEY, - "userId" TEXT NOT NULL, - "status" TEXT NOT NULL DEFAULT 'NOT_SUBMITTED', - "originalFileName" TEXT, - "storedFileName" TEXT, - "mimeType" TEXT, - "uploadedAt" DATETIME, - "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" DATETIME NOT NULL, - CONSTRAINT "PhysicianStatementForm_userId_fkey" FOREIGN KEY ("userId") REFERENCES "user" ("id") ON DELETE CASCADE ON UPDATE CASCADE -); - --- CreateTable -CREATE TABLE "ReleaseOfInformationAuthorizationForm" ( - "id" TEXT NOT NULL PRIMARY KEY, - "userId" TEXT NOT NULL, - "status" TEXT NOT NULL DEFAULT 'NOT_SUBMITTED', - "originalFileName" TEXT, - "storedFileName" TEXT, - "mimeType" TEXT, - "uploadedAt" DATETIME, - "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" DATETIME NOT NULL, - CONSTRAINT "ReleaseOfInformationAuthorizationForm_userId_fkey" FOREIGN KEY ("userId") REFERENCES "user" ("id") ON DELETE CASCADE ON UPDATE CASCADE -); - --- CreateTable -CREATE TABLE "session_note_edit" ( - "id" TEXT NOT NULL PRIMARY KEY, - "sessionNoteId" TEXT NOT NULL, - "originalContent" TEXT, - "reason" TEXT, - "signature" TEXT, - "editedAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, - CONSTRAINT "session_note_edit_sessionNoteId_fkey" FOREIGN KEY ("sessionNoteId") REFERENCES "session_note" ("id") ON DELETE CASCADE ON UPDATE CASCADE -); - --- CreateTable -CREATE TABLE "declaration_template" ( - "id" TEXT NOT NULL PRIMARY KEY, - "requestKind" TEXT NOT NULL, - "version" INTEGER NOT NULL, - "content" TEXT NOT NULL, - "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP -); - --- CreateTable -CREATE TABLE "session_notes_request" ( - "id" TEXT NOT NULL PRIMARY KEY, - "clientId" TEXT NOT NULL, - "requestKind" TEXT NOT NULL, - "status" TEXT NOT NULL DEFAULT 'PENDING', - "signatureData" TEXT NOT NULL, - "declarationTemplateId" TEXT NOT NULL, - "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, - "decidedAt" DATETIME, - "decidedByUserId" TEXT, - "rejectionReason" TEXT, - "approvedSummaryText" TEXT, - CONSTRAINT "session_notes_request_clientId_fkey" FOREIGN KEY ("clientId") REFERENCES "client" ("id") ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT "session_notes_request_declarationTemplateId_fkey" FOREIGN KEY ("declarationTemplateId") REFERENCES "declaration_template" ("id") ON DELETE RESTRICT ON UPDATE CASCADE, - CONSTRAINT "session_notes_request_decidedByUserId_fkey" FOREIGN KEY ("decidedByUserId") REFERENCES "user" ("id") ON DELETE SET NULL ON UPDATE CASCADE -); - --- RedefineTables -PRAGMA defer_foreign_keys=ON; -PRAGMA foreign_keys=OFF; -CREATE TABLE "new_change_audit" ( - "id" TEXT NOT NULL PRIMARY KEY, - "entityType" TEXT NOT NULL, - "entityId" TEXT NOT NULL, - "oldValue" TEXT, - "newValue" TEXT, - "reasoning" TEXT, - "documentationPath" TEXT, - "documentationName" TEXT, - "signatureData" TEXT NOT NULL, - "signedById" TEXT NOT NULL, - "signedAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, - CONSTRAINT "change_audit_signedById_fkey" FOREIGN KEY ("signedById") REFERENCES "user" ("id") ON DELETE CASCADE ON UPDATE CASCADE -); -INSERT INTO "new_change_audit" ("entityId", "entityType", "id", "newValue", "oldValue", "reasoning", "signatureData", "signedAt", "signedById") SELECT "entityId", "entityType", "id", "newValue", "oldValue", "reasoning", "signatureData", "signedAt", "signedById" FROM "change_audit"; -DROP TABLE "change_audit"; -ALTER TABLE "new_change_audit" RENAME TO "change_audit"; -CREATE INDEX "change_audit_entityType_entityId_idx" ON "change_audit"("entityType", "entityId"); -PRAGMA foreign_keys=ON; -PRAGMA defer_foreign_keys=OFF; - --- CreateIndex -CREATE INDEX "Appointment_clientId_idx" ON "Appointment"("clientId"); - --- CreateIndex -CREATE INDEX "Appointment_adminId_idx" ON "Appointment"("adminId"); - --- CreateIndex -CREATE UNIQUE INDEX "PhysicianStatementForm_userId_key" ON "PhysicianStatementForm"("userId"); - --- CreateIndex -CREATE INDEX "PhysicianStatementForm_status_idx" ON "PhysicianStatementForm"("status"); - --- CreateIndex -CREATE UNIQUE INDEX "ReleaseOfInformationAuthorizationForm_userId_key" ON "ReleaseOfInformationAuthorizationForm"("userId"); - --- CreateIndex -CREATE INDEX "ReleaseOfInformationAuthorizationForm_status_idx" ON "ReleaseOfInformationAuthorizationForm"("status"); - --- CreateIndex -CREATE INDEX "session_note_edit_sessionNoteId_idx" ON "session_note_edit"("sessionNoteId"); - --- CreateIndex -CREATE UNIQUE INDEX "declaration_template_requestKind_version_key" ON "declaration_template"("requestKind", "version"); - --- CreateIndex -CREATE INDEX "session_notes_request_clientId_idx" ON "session_notes_request"("clientId"); - --- CreateIndex -CREATE INDEX "session_notes_request_status_idx" ON "session_notes_request"("status"); - --- CreateIndex -CREATE INDEX "session_notes_request_declarationTemplateId_idx" ON "session_notes_request"("declarationTemplateId"); diff --git a/prisma/migrations/20260402035909_remove_dynamic_forms/migration.sql b/prisma/migrations/20260402035909_remove_dynamic_forms/migration.sql deleted file mode 100644 index 21cc75c..0000000 --- a/prisma/migrations/20260402035909_remove_dynamic_forms/migration.sql +++ /dev/null @@ -1,28 +0,0 @@ -/* - Warnings: - - - You are about to drop the `form` table. If the table is not empty, all the data it contains will be lost. - - You are about to drop the `form_assignment` table. If the table is not empty, all the data it contains will be lost. - - You are about to drop the `form_question` table. If the table is not empty, all the data it contains will be lost. - - You are about to drop the `question` table. If the table is not empty, all the data it contains will be lost. - -*/ --- DropTable -PRAGMA foreign_keys=off; -DROP TABLE "form"; -PRAGMA foreign_keys=on; - --- DropTable -PRAGMA foreign_keys=off; -DROP TABLE "form_assignment"; -PRAGMA foreign_keys=on; - --- DropTable -PRAGMA foreign_keys=off; -DROP TABLE "form_question"; -PRAGMA foreign_keys=on; - --- DropTable -PRAGMA foreign_keys=off; -DROP TABLE "question"; -PRAGMA foreign_keys=on; diff --git a/prisma/migrations/20260402041509_hardcode_ace_form/migration.sql b/prisma/migrations/20260402041509_hardcode_ace_form/migration.sql deleted file mode 100644 index 575593d..0000000 --- a/prisma/migrations/20260402041509_hardcode_ace_form/migration.sql +++ /dev/null @@ -1,52 +0,0 @@ -/* - Warnings: - - - You are about to drop the `ace_response` table. If the table is not empty, all the data it contains will be lost. - -*/ --- DropTable -PRAGMA foreign_keys=off; -DROP TABLE "ace_response"; -PRAGMA foreign_keys=on; - --- CreateTable -CREATE TABLE "ace_form" ( - "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - "userId" TEXT NOT NULL, - "status" TEXT NOT NULL DEFAULT 'IN_PROGRESS', - "totalScore" INTEGER, - "severity" TEXT, - "submittedAt" DATETIME, - CONSTRAINT "ace_form_userId_fkey" FOREIGN KEY ("userId") REFERENCES "user" ("id") ON DELETE CASCADE ON UPDATE CASCADE -); - --- CreateTable -CREATE TABLE "ace_question" ( - "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - "formId" INTEGER NOT NULL, - "userId" TEXT NOT NULL, - "a01" TEXT, - "a02" TEXT, - "a03" TEXT, - "a04" TEXT, - "a05" TEXT, - "a06" TEXT, - "a07" TEXT, - "a08" TEXT, - "a09" TEXT, - "a10" TEXT, - CONSTRAINT "ace_question_formId_fkey" FOREIGN KEY ("formId") REFERENCES "ace_form" ("id") ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT "ace_question_userId_fkey" FOREIGN KEY ("userId") REFERENCES "user" ("id") ON DELETE CASCADE ON UPDATE CASCADE -); - --- CreateIndex -CREATE UNIQUE INDEX "ace_form_userId_key" ON "ace_form"("userId"); - --- CreateIndex -CREATE INDEX "ace_form_userId_idx" ON "ace_form"("userId"); - --- CreateIndex -CREATE UNIQUE INDEX "ace_question_formId_key" ON "ace_question"("formId"); - --- CreateIndex -CREATE INDEX "ace_question_userId_idx" ON "ace_question"("userId"); diff --git a/prisma/migrations/20260426215909_add_client_clinician_user_id/migration.sql b/prisma/migrations/20260426215909_add_client_clinician_user_id/migration.sql deleted file mode 100644 index edb850a..0000000 --- a/prisma/migrations/20260426215909_add_client_clinician_user_id/migration.sql +++ /dev/null @@ -1,194 +0,0 @@ -/* - Warnings: - - - You are about to drop the `ace_form` table. If the table is not empty, all the data it contains will be lost. - - You are about to drop the `ace_question` table. If the table is not empty, all the data it contains will be lost. - - Added the required column `sessionName` to the `Appointment` table without a default value. This is not possible if the table is not empty. - - Added the required column `sessionNumber` to the `Appointment` table without a default value. This is not possible if the table is not empty. - - Added the required column `sessionName` to the `session_note` table without a default value. This is not possible if the table is not empty. - - Added the required column `sessionNumber` to the `session_note` table without a default value. This is not possible if the table is not empty. - -*/ --- DropIndex -DROP INDEX "PhqForm_userId_key"; - --- DropIndex -DROP INDEX "ace_form_userId_idx"; - --- DropIndex -DROP INDEX "ace_form_userId_key"; - --- DropIndex -DROP INDEX "ace_question_userId_idx"; - --- DropIndex -DROP INDEX "ace_question_formId_key"; - --- AlterTable -ALTER TABLE "session_notes_request" ADD COLUMN "approvalReason" TEXT; -ALTER TABLE "session_notes_request" ADD COLUMN "endDate" DATETIME; -ALTER TABLE "session_notes_request" ADD COLUMN "startDate" DATETIME; - --- DropTable -PRAGMA foreign_keys=off; -DROP TABLE "ace_form"; -PRAGMA foreign_keys=on; - --- DropTable -PRAGMA foreign_keys=off; -DROP TABLE "ace_question"; -PRAGMA foreign_keys=on; - --- CreateTable -CREATE TABLE "client_form_score_history" ( - "id" TEXT NOT NULL PRIMARY KEY, - "userId" TEXT NOT NULL, - "formKey" TEXT NOT NULL, - "score" INTEGER, - "severity" TEXT, - "recordedAt" DATETIME NOT NULL, - "answersJson" TEXT, - CONSTRAINT "client_form_score_history_userId_fkey" FOREIGN KEY ("userId") REFERENCES "user" ("id") ON DELETE CASCADE ON UPDATE CASCADE -); - --- CreateTable -CREATE TABLE "AceForm" ( - "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - "userId" TEXT NOT NULL, - "status" TEXT NOT NULL DEFAULT 'IN_PROGRESS', - "totalScore" INTEGER, - "severity" TEXT, - "submittedAt" DATETIME, - CONSTRAINT "AceForm_userId_fkey" FOREIGN KEY ("userId") REFERENCES "user" ("id") ON DELETE CASCADE ON UPDATE CASCADE -); - --- CreateTable -CREATE TABLE "AceQuestion" ( - "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - "formId" INTEGER NOT NULL, - "userId" TEXT NOT NULL, - "a01" TEXT, - "a02" TEXT, - "a03" TEXT, - "a04" TEXT, - "a05" TEXT, - "a06" TEXT, - "a07" TEXT, - "a08" TEXT, - "a09" TEXT, - "a10" TEXT, - CONSTRAINT "AceQuestion_formId_fkey" FOREIGN KEY ("formId") REFERENCES "AceForm" ("id") ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT "AceQuestion_userId_fkey" FOREIGN KEY ("userId") REFERENCES "user" ("id") ON DELETE CASCADE ON UPDATE CASCADE -); - --- CreateTable -CREATE TABLE "notification" ( - "id" TEXT NOT NULL PRIMARY KEY, - "userId" TEXT NOT NULL, - "type" TEXT NOT NULL, - "title" TEXT NOT NULL, - "message" TEXT NOT NULL, - "sessionNoteId" TEXT, - "readAt" DATETIME, - "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, - CONSTRAINT "notification_userId_fkey" FOREIGN KEY ("userId") REFERENCES "user" ("id") ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT "notification_sessionNoteId_fkey" FOREIGN KEY ("sessionNoteId") REFERENCES "session_note" ("id") ON DELETE CASCADE ON UPDATE CASCADE -); - --- RedefineTables -PRAGMA defer_foreign_keys=ON; -PRAGMA foreign_keys=OFF; -CREATE TABLE "new_Appointment" ( - "id" TEXT NOT NULL PRIMARY KEY, - "clientId" TEXT NOT NULL, - "adminId" TEXT NOT NULL, - "title" TEXT NOT NULL, - "sessionName" TEXT NOT NULL, - "sessionNumber" INTEGER NOT NULL, - "description" TEXT, - "startTime" DATETIME NOT NULL, - "endTime" DATETIME NOT NULL, - "status" TEXT NOT NULL DEFAULT 'SCHEDULED', - "videoProvider" TEXT, - "videoJoinUrl" TEXT, - "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" DATETIME NOT NULL, - CONSTRAINT "Appointment_clientId_fkey" FOREIGN KEY ("clientId") REFERENCES "user" ("id") ON DELETE RESTRICT ON UPDATE CASCADE, - CONSTRAINT "Appointment_adminId_fkey" FOREIGN KEY ("adminId") REFERENCES "user" ("id") ON DELETE RESTRICT ON UPDATE CASCADE -); -INSERT INTO "new_Appointment" ("adminId", "clientId", "createdAt", "description", "endTime", "id", "startTime", "status", "title", "updatedAt") SELECT "adminId", "clientId", "createdAt", "description", "endTime", "id", "startTime", "status", "title", "updatedAt" FROM "Appointment"; -DROP TABLE "Appointment"; -ALTER TABLE "new_Appointment" RENAME TO "Appointment"; -CREATE INDEX "Appointment_clientId_idx" ON "Appointment"("clientId"); -CREATE INDEX "Appointment_adminId_idx" ON "Appointment"("adminId"); -CREATE UNIQUE INDEX "Appointment_clientId_sessionNumber_key" ON "Appointment"("clientId", "sessionNumber"); -CREATE TABLE "new_client" ( - "id" TEXT NOT NULL PRIMARY KEY, - "userId" TEXT NOT NULL, - "status" TEXT NOT NULL DEFAULT 'INCOMPLETE', - "waitlistedAt" DATETIME, - "archivedAt" DATETIME, - "therapyWeek" INTEGER, - "missedSessions" INTEGER NOT NULL DEFAULT 0, - "clinicianUserId" TEXT, - CONSTRAINT "client_userId_fkey" FOREIGN KEY ("userId") REFERENCES "user" ("id") ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT "client_clinicianUserId_fkey" FOREIGN KEY ("clinicianUserId") REFERENCES "user" ("id") ON DELETE SET NULL ON UPDATE CASCADE -); -INSERT INTO "new_client" ("id", "missedSessions", "status", "therapyWeek", "userId") SELECT "id", "missedSessions", "status", "therapyWeek", "userId" FROM "client"; -DROP TABLE "client"; -ALTER TABLE "new_client" RENAME TO "client"; -CREATE UNIQUE INDEX "client_userId_key" ON "client"("userId"); -CREATE INDEX "client_status_idx" ON "client"("status"); -CREATE INDEX "client_clinicianUserId_idx" ON "client"("clinicianUserId"); -CREATE TABLE "new_session_note" ( - "id" TEXT NOT NULL PRIMARY KEY, - "clientId" TEXT NOT NULL, - "sessionName" TEXT NOT NULL, - "sessionNumber" INTEGER NOT NULL, - "appointmentId" TEXT, - "kind" TEXT NOT NULL DEFAULT 'PROGRESS', - "status" TEXT NOT NULL DEFAULT 'DRAFT', - "content" TEXT NOT NULL, - "attended" BOOLEAN NOT NULL DEFAULT true, - "signatureData" TEXT, - "clinicianSignedAt" DATETIME, - "clinicianSignedById" TEXT, - "clinicianSignatureData" TEXT, - "adminSignedAt" DATETIME, - "adminSignedById" TEXT, - "adminSignatureData" TEXT, - "adminApprovalNote" TEXT, - "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, - CONSTRAINT "session_note_clientId_fkey" FOREIGN KEY ("clientId") REFERENCES "client" ("id") ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT "session_note_appointmentId_fkey" FOREIGN KEY ("appointmentId") REFERENCES "Appointment" ("id") ON DELETE SET NULL ON UPDATE CASCADE, - CONSTRAINT "session_note_clinicianSignedById_fkey" FOREIGN KEY ("clinicianSignedById") REFERENCES "user" ("id") ON DELETE SET NULL ON UPDATE CASCADE, - CONSTRAINT "session_note_adminSignedById_fkey" FOREIGN KEY ("adminSignedById") REFERENCES "user" ("id") ON DELETE SET NULL ON UPDATE CASCADE -); -INSERT INTO "new_session_note" ("clientId", "content", "createdAt", "id") SELECT "clientId", "content", "createdAt", "id" FROM "session_note"; -DROP TABLE "session_note"; -ALTER TABLE "new_session_note" RENAME TO "session_note"; -CREATE INDEX "session_note_clientId_idx" ON "session_note"("clientId"); -CREATE INDEX "session_note_appointmentId_idx" ON "session_note"("appointmentId"); -CREATE INDEX "session_note_status_idx" ON "session_note"("status"); -CREATE INDEX "session_note_kind_idx" ON "session_note"("kind"); -PRAGMA foreign_keys=ON; -PRAGMA defer_foreign_keys=OFF; - --- CreateIndex -CREATE INDEX "client_form_score_history_userId_recordedAt_idx" ON "client_form_score_history"("userId", "recordedAt"); - --- CreateIndex -CREATE INDEX "AceForm_userId_idx" ON "AceForm"("userId"); - --- CreateIndex -CREATE UNIQUE INDEX "AceQuestion_formId_key" ON "AceQuestion"("formId"); - --- CreateIndex -CREATE INDEX "AceQuestion_userId_idx" ON "AceQuestion"("userId"); - --- CreateIndex -CREATE INDEX "notification_userId_readAt_idx" ON "notification"("userId", "readAt"); - --- CreateIndex -CREATE INDEX "notification_userId_createdAt_idx" ON "notification"("userId", "createdAt"); diff --git a/prisma/migrations/migration_lock.toml b/prisma/migrations/migration_lock.toml deleted file mode 100644 index 2a5a444..0000000 --- a/prisma/migrations/migration_lock.toml +++ /dev/null @@ -1,3 +0,0 @@ -# Please do not edit this file manually -# It should be added in your version-control system (e.g., Git) -provider = "sqlite"