-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add rag table migrations (#385)
- Loading branch information
Showing
3 changed files
with
33 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
packages/db/prisma/migrations/20241126121910_ingest_rag_published_index/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* | ||
Warnings: | ||
- Added the required column `oak_lesson_slug` to the `rag_lesson_plans` table without a default value. This is not possible if the table is not empty. | ||
*/ | ||
-- AlterTable | ||
ALTER TABLE "ingest"."ingest" ALTER COLUMN "config" DROP DEFAULT; | ||
|
||
-- AlterTable | ||
ALTER TABLE "rag"."rag_lesson_plans" ADD COLUMN "is_published" BOOLEAN NOT NULL DEFAULT false, | ||
ADD COLUMN "oak_lesson_slug" TEXT NOT NULL, | ||
ALTER COLUMN "oak_lesson_id" DROP NOT NULL; | ||
|
||
-- CreateIndex | ||
CREATE INDEX "idx_rag_lesson_plans_published_key_stage_subject" ON "rag"."rag_lesson_plans"("is_published", "key_stage_slug", "subject_slug"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters