jws-backend/prisma/migrations/20240612065711_composite_key_m2m/migration.sql
2024-06-12 15:53:28 +07:00

18 lines
861 B
SQL

/*
Warnings:
- The primary key for the `WorkProduct` table will be changed. If it partially fails, the table could be left without primary key constraint.
- You are about to drop the column `id` on the `WorkProduct` table. All the data in the column will be lost.
- The primary key for the `WorkService` table will be changed. If it partially fails, the table could be left without primary key constraint.
- You are about to drop the column `id` on the `WorkService` table. All the data in the column will be lost.
*/
-- AlterTable
ALTER TABLE "WorkProduct" DROP CONSTRAINT "WorkProduct_pkey",
DROP COLUMN "id",
ADD CONSTRAINT "WorkProduct_pkey" PRIMARY KEY ("workId", "productId");
-- AlterTable
ALTER TABLE "WorkService" DROP CONSTRAINT "WorkService_pkey",
DROP COLUMN "id",
ADD CONSTRAINT "WorkService_pkey" PRIMARY KEY ("workId", "serviceId");