/*
  Warnings:

  - You are about to drop the column `templateTypeId` on the `templates` table. All the data in the column will be lost.
  - Added the required column `organizationTypeId` to the `templates` table without a default value. This is not possible if the table is not empty.

*/
-- DropForeignKey
ALTER TABLE "templates" DROP CONSTRAINT "templates_templateTypeId_fkey";

-- AlterTable
ALTER TABLE "templates" DROP COLUMN "templateTypeId",
ADD COLUMN     "organizationTypeId" INTEGER NOT NULL;

-- AddForeignKey
ALTER TABLE "templates" ADD CONSTRAINT "templates_organizationTypeId_fkey" FOREIGN KEY ("organizationTypeId") REFERENCES "organization_types"("id") ON DELETE CASCADE ON UPDATE CASCADE;
