-
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.
- Loading branch information
Showing
3 changed files
with
56 additions
and
9 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
prisma/migrations/20240216102359_availability_date_key/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,19 @@ | ||
/* | ||
Warnings: | ||
- You are about to drop the column `date` on the `AvailabilityDate` table. All the data in the column will be lost. | ||
- A unique constraint covering the columns `[householdId,month,day]` on the table `AvailabilityDate` will be added. If there are existing duplicate values, this will fail. | ||
- Added the required column `day` to the `AvailabilityDate` table without a default value. This is not possible if the table is not empty. | ||
- Added the required column `month` to the `AvailabilityDate` table without a default value. This is not possible if the table is not empty. | ||
*/ | ||
-- DropIndex | ||
DROP INDEX "AvailabilityDate_householdId_date_key"; | ||
|
||
-- AlterTable | ||
ALTER TABLE "AvailabilityDate" DROP COLUMN "date", | ||
ADD COLUMN "day" INTEGER NOT NULL, | ||
ADD COLUMN "month" INTEGER NOT NULL; | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "AvailabilityDate_householdId_month_day_key" ON "AvailabilityDate"("householdId", "month", "day"); |
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