diff --git a/prisma/migrations/20241107151131_compound_id_for_reporting_periods/migration.sql b/prisma/migrations/20241107151131_compound_id_for_reporting_periods/migration.sql index efb13c9e..63c3b174 100644 --- a/prisma/migrations/20241107151131_compound_id_for_reporting_periods/migration.sql +++ b/prisma/migrations/20241107151131_compound_id_for_reporting_periods/migration.sql @@ -22,7 +22,7 @@ ALTER TABLE "Initiative" DROP COLUMN "reportingPeriodId"; -- AlterTable ALTER TABLE "ReportingPeriod" ADD COLUMN "year" TEXT; -UPDATE "ReportingPeriod" SET "year" = DATE_PART("year", "endDate"::date); +UPDATE "ReportingPeriod" SET "year" = DATE_PART('year', "endDate"::date); ALTER TABLE "ReportingPeriod" ALTER COLUMN "year" SET NOT NULL; ALTER TABLE "ReportingPeriod" DROP CONSTRAINT "ReportingPeriod_pkey",