-
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.
Refactor DailyDepartmentNotification schema and repository; drop gift…
…Key column and add donorHash
- Loading branch information
1 parent
2a4964a
commit 1d881aa
Showing
5 changed files
with
66 additions
and
25 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
packages/server/prisma/migrations/20250129184320_/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,22 @@ | ||
/* | ||
Warnings: | ||
- You are about to drop the column `giftKey` on the `DDNDonor` table. All the data in the column will be lost. | ||
- A unique constraint covering the columns `[idSorter,processDate,batchId,solicitationCodeId,combinedAmount,donorHash]` on the table `DailyDepartmentNotification` will be added. If there are existing duplicate values, this will fail. | ||
- Added the required column `donorHash` to the `DailyDepartmentNotification` table without a default value. This is not possible if the table is not empty. | ||
*/ | ||
-- DropIndex | ||
DROP INDEX "DailyDepartmentNotification_idSorter_processDate_batchId_so_key"; | ||
|
||
-- AlterTable | ||
ALTER TABLE "DDNDonor" DROP COLUMN "giftKey"; | ||
|
||
-- AlterTable | ||
ALTER TABLE "DDNDonorLink" ADD COLUMN "giftKey" TEXT; | ||
|
||
-- AlterTable | ||
ALTER TABLE "DailyDepartmentNotification" ADD COLUMN "donorHash" TEXT NOT NULL; | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "DailyDepartmentNotification_idSorter_processDate_batchId_so_key" ON "DailyDepartmentNotification"("idSorter", "processDate", "batchId", "solicitationCodeId", "combinedAmount", "donorHash"); |
17 changes: 17 additions & 0 deletions
17
packages/server/prisma/migrations/20250129185240_/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,17 @@ | ||
/* | ||
Warnings: | ||
- You are about to drop the column `donorHash` on the `DailyDepartmentNotification` table. All the data in the column will be lost. | ||
- A unique constraint covering the columns `[idSorter,processDate,batchId,solicitationCodeId,combinedAmount,donorSummary]` on the table `DailyDepartmentNotification` will be added. If there are existing duplicate values, this will fail. | ||
- Added the required column `donorSummary` to the `DailyDepartmentNotification` table without a default value. This is not possible if the table is not empty. | ||
*/ | ||
-- DropIndex | ||
DROP INDEX "DailyDepartmentNotification_idSorter_processDate_batchId_so_key"; | ||
|
||
-- AlterTable | ||
ALTER TABLE "DailyDepartmentNotification" DROP COLUMN "donorHash", | ||
ADD COLUMN "donorSummary" TEXT NOT NULL; | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "DailyDepartmentNotification_idSorter_processDate_batchId_so_key" ON "DailyDepartmentNotification"("idSorter", "processDate", "batchId", "solicitationCodeId", "combinedAmount", "donorSummary"); |
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