-
Notifications
You must be signed in to change notification settings - Fork 3
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
9dda909
commit 1454aa7
Showing
9 changed files
with
169 additions
and
94 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
prisma/migrations/20250112110051_add_col_index_src/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,2 @@ | ||
-- AddForeignKey | ||
ALTER TABLE "SheetColumnValue" ADD CONSTRAINT "SheetColumnValue_sourceIndexId_fkey" FOREIGN KEY ("sourceIndexId") REFERENCES "IndexedSource"("id") ON DELETE SET NULL ON UPDATE CASCADE; |
51 changes: 51 additions & 0 deletions
51
prisma/migrations/20250112112049_rename_cols_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,51 @@ | ||
/* | ||
Warnings: | ||
- The primary key for the `SheetColumnValue` table will be changed. If it partially fails, the table could be left without primary key constraint. | ||
- You are about to drop the column `columnId` on the `SheetColumnValue` table. All the data in the column will be lost. | ||
- You are about to drop the column `sourceId` on the `SheetColumnValue` table. All the data in the column will be lost. | ||
- You are about to drop the column `sourceIndexId` on the `SheetColumnValue` table. All the data in the column will be lost. | ||
- Added the required column `updatedAt` to the `SheetColumn` table without a default value. This is not possible if the table is not empty. | ||
- Added the required column `sheetColumnId` to the `SheetColumnValue` table without a default value. This is not possible if the table is not empty. | ||
- Added the required column `sheetSourceId` to the `SheetColumnValue` table without a default value. This is not possible if the table is not empty. | ||
- Added the required column `updatedAt` to the `SheetColumnValue` table without a default value. This is not possible if the table is not empty. | ||
- Added the required column `updatedAt` to the `SheetSource` table without a default value. This is not possible if the table is not empty. | ||
*/ | ||
-- DropForeignKey | ||
ALTER TABLE "SheetColumnValue" DROP CONSTRAINT "SheetColumnValue_columnId_fkey"; | ||
|
||
-- DropForeignKey | ||
ALTER TABLE "SheetColumnValue" DROP CONSTRAINT "SheetColumnValue_sourceId_fkey"; | ||
|
||
-- DropForeignKey | ||
ALTER TABLE "SheetColumnValue" DROP CONSTRAINT "SheetColumnValue_sourceIndexId_fkey"; | ||
|
||
-- AlterTable | ||
ALTER TABLE "SheetColumn" ADD COLUMN "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
ADD COLUMN "updatedAt" TIMESTAMP(3) NOT NULL; | ||
|
||
-- AlterTable | ||
ALTER TABLE "SheetColumnValue" DROP CONSTRAINT "SheetColumnValue_pkey", | ||
DROP COLUMN "columnId", | ||
DROP COLUMN "sourceId", | ||
DROP COLUMN "sourceIndexId", | ||
ADD COLUMN "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
ADD COLUMN "indexedSourceId" TEXT, | ||
ADD COLUMN "sheetColumnId" TEXT NOT NULL, | ||
ADD COLUMN "sheetSourceId" TEXT NOT NULL, | ||
ADD COLUMN "updatedAt" TIMESTAMP(3) NOT NULL, | ||
ADD CONSTRAINT "SheetColumnValue_pkey" PRIMARY KEY ("sheetColumnId", "sheetSourceId"); | ||
|
||
-- AlterTable | ||
ALTER TABLE "SheetSource" ADD COLUMN "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
ADD COLUMN "updatedAt" TIMESTAMP(3) NOT NULL; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "SheetColumnValue" ADD CONSTRAINT "SheetColumnValue_sheetColumnId_fkey" FOREIGN KEY ("sheetColumnId") REFERENCES "SheetColumn"("id") ON DELETE RESTRICT ON UPDATE CASCADE; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "SheetColumnValue" ADD CONSTRAINT "SheetColumnValue_sheetSourceId_fkey" FOREIGN KEY ("sheetSourceId") REFERENCES "SheetSource"("id") ON DELETE RESTRICT ON UPDATE CASCADE; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "SheetColumnValue" ADD CONSTRAINT "SheetColumnValue_indexedSourceId_fkey" FOREIGN KEY ("indexedSourceId") REFERENCES "IndexedSource"("id") ON DELETE SET NULL 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
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.