fix: update migration to drop invalid fields

This commit is contained in:
David Nguyen
2024-04-19 17:58:32 +07:00
parent a97ffa97a4
commit f6e6dac46c

View File

@ -4,5 +4,8 @@
- Made the column `recipientId` on table `Field` required. This step will fail if there are existing NULL values in that column.
*/
-- Drop all Fields where the recipientId is null
DELETE FROM "Field" WHERE "recipientId" IS NULL;
-- AlterTable
ALTER TABLE "Field" ALTER COLUMN "recipientId" SET NOT NULL;