wizeline / project-lab

Proposal Hunt / Project Lab experimental repo
MIT License
5 stars 0 forks source link

Investigate _ProjectsToSkills data being deleted on deploys #361

Open jackbravo opened 2 years ago

jackbravo commented 2 years ago

Consider creating a new migration dropping our current foreign keys that do ON DELETE CASCADE. This is what we have currently on db/migrations/20220603011001_initial_migration/migration.sql:

-- AddForeignKey
ALTER TABLE "_ProjectsToSkills" ADD CONSTRAINT "_ProjectsToSkills_A_fkey" FOREIGN KEY ("A") REFERENCES "Projects"("id") ON DELETE CASCADE ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "_ProjectsToSkills" ADD CONSTRAINT "_ProjectsToSkills_B_fkey" FOREIGN KEY ("B") REFERENCES "Skills"("id") ON DELETE CASCADE ON UPDATE CASCADE;