/* Warnings: - The primary key for the `Registratore` table will be changed. If it partially fails, the table could be left without primary key constraint. */ -- DropForeignKey ALTER TABLE "public"."Intervento" DROP CONSTRAINT "Intervento_id_registratore_fkey"; -- AlterTable ALTER TABLE "Intervento" ALTER COLUMN "id_registratore" SET DATA TYPE TEXT; -- AlterTable ALTER TABLE "Registratore" DROP CONSTRAINT "Registratore_pkey", ALTER COLUMN "id" DROP DEFAULT, ALTER COLUMN "id" SET DATA TYPE TEXT, ADD CONSTRAINT "Registratore_pkey" PRIMARY KEY ("id"); DROP SEQUENCE "Registratore_id_seq"; -- AddForeignKey ALTER TABLE "Intervento" ADD CONSTRAINT "Intervento_id_registratore_fkey" FOREIGN KEY ("id_registratore") REFERENCES "Registratore"("id") ON DELETE RESTRICT ON UPDATE CASCADE;