-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e5313a0
commit bc1a871
Showing
20 changed files
with
1,146 additions
and
78 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
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
Large diffs are not rendered by default.
Oops, something went wrong.
49 changes: 49 additions & 0 deletions
49
prisma/migrations/20250110142328_org_and_index_source/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,49 @@ | ||
/* | ||
Warnings: | ||
- Added the required column `organizationId` to the `SheetColumn` table without a default value. This is not possible if the table is not empty. | ||
- Added the required column `organizationId` to the `SheetColumnValue` table without a default value. This is not possible if the table is not empty. | ||
- Added the required column `organizationId` to the `SheetSource` table without a default value. This is not possible if the table is not empty. | ||
*/ | ||
-- AlterTable | ||
ALTER TABLE "SheetColumn" ADD COLUMN "organizationId" TEXT NOT NULL; | ||
|
||
-- AlterTable | ||
ALTER TABLE "SheetColumnValue" ADD COLUMN "organizationId" TEXT NOT NULL; | ||
|
||
-- AlterTable | ||
ALTER TABLE "SheetSource" ADD COLUMN "organizationId" TEXT NOT NULL; | ||
|
||
-- CreateTable | ||
CREATE TABLE "IndexedSource" ( | ||
"id" TEXT NOT NULL, | ||
"indexId" TEXT NOT NULL, | ||
"referenceImageNickName" TEXT NOT NULL, | ||
"referenceImageFileName" TEXT NOT NULL, | ||
"sheetId" TEXT NOT NULL, | ||
"sourceId" TEXT NOT NULL, | ||
"organizationId" TEXT NOT NULL, | ||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"updatedAt" TIMESTAMP(3) NOT NULL, | ||
|
||
CONSTRAINT "IndexedSource_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "SheetSource" ADD CONSTRAINT "SheetSource_organizationId_fkey" FOREIGN KEY ("organizationId") REFERENCES "Organization"("id") ON DELETE RESTRICT ON UPDATE CASCADE; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "SheetColumn" ADD CONSTRAINT "SheetColumn_organizationId_fkey" FOREIGN KEY ("organizationId") REFERENCES "Organization"("id") ON DELETE RESTRICT ON UPDATE CASCADE; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "SheetColumnValue" ADD CONSTRAINT "SheetColumnValue_organizationId_fkey" FOREIGN KEY ("organizationId") REFERENCES "Organization"("id") ON DELETE RESTRICT ON UPDATE CASCADE; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "IndexedSource" ADD CONSTRAINT "IndexedSource_sheetId_fkey" FOREIGN KEY ("sheetId") REFERENCES "Sheet"("id") ON DELETE RESTRICT ON UPDATE CASCADE; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "IndexedSource" ADD CONSTRAINT "IndexedSource_sourceId_fkey" FOREIGN KEY ("sourceId") REFERENCES "Source"("id") ON DELETE RESTRICT ON UPDATE CASCADE; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "IndexedSource" ADD CONSTRAINT "IndexedSource_organizationId_fkey" FOREIGN KEY ("organizationId") REFERENCES "Organization"("id") ON DELETE RESTRICT ON UPDATE CASCADE; |
8 changes: 8 additions & 0 deletions
8
prisma/migrations/20250111042646_indexed_source_file/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,8 @@ | ||
/* | ||
Warnings: | ||
- You are about to drop the column `referenceImageNickName` on the `IndexedSource` table. All the data in the column will be lost. | ||
*/ | ||
-- AlterTable | ||
ALTER TABLE "IndexedSource" DROP COLUMN "referenceImageNickName"; |
11 changes: 11 additions & 0 deletions
11
prisma/migrations/20250111042826_remove_index_src_sheet/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,11 @@ | ||
/* | ||
Warnings: | ||
- You are about to drop the column `sheetId` on the `IndexedSource` table. All the data in the column will be lost. | ||
*/ | ||
-- DropForeignKey | ||
ALTER TABLE "IndexedSource" DROP CONSTRAINT "IndexedSource_sheetId_fkey"; | ||
|
||
-- AlterTable | ||
ALTER TABLE "IndexedSource" DROP COLUMN "sheetId"; |
6 changes: 6 additions & 0 deletions
6
prisma/migrations/20250111044108_src_indexing_opt/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,6 @@ | ||
-- AlterTable | ||
ALTER TABLE "IndexedSource" ADD COLUMN "referenceText" TEXT, | ||
ALTER COLUMN "referenceImageFileName" DROP NOT NULL; | ||
|
||
-- AlterTable | ||
ALTER TABLE "Source" ADD COLUMN "isIndexing" BOOLEAN NOT NULL DEFAULT false; |
11 changes: 11 additions & 0 deletions
11
prisma/migrations/20250111052712_src_upload_fix_case/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,11 @@ | ||
/* | ||
Warnings: | ||
- Added the required column `uploadedById` to the `Source` table without a default value. This is not possible if the table is not empty. | ||
*/ | ||
-- AlterTable | ||
ALTER TABLE "Source" ADD COLUMN "uploadedById" TEXT NOT NULL; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "Source" ADD CONSTRAINT "Source_uploadedById_fkey" FOREIGN KEY ("uploadedById") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; |
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
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
Oops, something went wrong.