-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Add MovementType and TargetMuscle enums to schema and migration
- Loading branch information
1 parent
c369aa9
commit 0729ef0
Showing
3 changed files
with
51 additions
and
3 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
prisma/migrations/20240725044812_movement_type/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,20 @@ | ||
/* | ||
Warnings: | ||
- You are about to drop the column `how_to_make` on the `meals` table. All the data in the column will be lost. | ||
- Made the column `imageUrl` on table `meals` required. This step will fail if there are existing NULL values in that column. | ||
*/ | ||
-- CreateEnum | ||
CREATE TYPE "MovementType" AS ENUM ('PUSH', 'PULL', 'LEGS', 'CORE', 'FULL_BODY'); | ||
|
||
-- CreateEnum | ||
CREATE TYPE "TargetMuscle" AS ENUM ('CHEST', 'BACK', 'SHOULDERS', 'BICEPS', 'TRICEPS', 'FOREARMS', 'ABS', 'QUADS', 'HAMSTRINGS', 'CALVES', 'GLUTES', 'ADDUCTORS', 'ABDUCTORS', 'TRAPS', 'LATS', 'LOWER_BACK'); | ||
|
||
-- AlterTable | ||
ALTER TABLE "meals" DROP COLUMN "how_to_make", | ||
ALTER COLUMN "imageUrl" SET NOT NULL; | ||
|
||
-- AlterTable | ||
ALTER TABLE "workouts" ADD COLUMN "movementType" "MovementType" NOT NULL DEFAULT 'FULL_BODY', | ||
ADD COLUMN "targetMuscle" "TargetMuscle"[]; |
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
Empty file.