2022-07-20 18:49:53 +00:00
|
|
|
-- DropForeignKey
|
2022-07-27 00:45:10 +00:00
|
|
|
ALTER TABLE "DestinationCalendar" DROP CONSTRAINT IF EXISTS "DestinationCalendar_bookingId_fkey";
|
2022-07-20 18:49:53 +00:00
|
|
|
|
|
|
|
-- DropForeignKey
|
|
|
|
ALTER TABLE "DestinationCalendar" DROP CONSTRAINT "DestinationCalendar_eventTypeId_fkey";
|
|
|
|
|
|
|
|
-- DropForeignKey
|
|
|
|
ALTER TABLE "DestinationCalendar" DROP CONSTRAINT "DestinationCalendar_userId_fkey";
|
|
|
|
|
|
|
|
-- DropForeignKey
|
|
|
|
ALTER TABLE "EventType" DROP CONSTRAINT "EventType_teamId_fkey";
|
|
|
|
|
|
|
|
-- DropForeignKey
|
|
|
|
ALTER TABLE "EventType" DROP CONSTRAINT "EventType_userId_fkey";
|
|
|
|
|
|
|
|
-- DropForeignKey
|
|
|
|
ALTER TABLE "EventTypeCustomInput" DROP CONSTRAINT "EventTypeCustomInput_eventTypeId_fkey";
|
|
|
|
|
|
|
|
-- DropForeignKey
|
|
|
|
ALTER TABLE "Membership" DROP CONSTRAINT "Membership_teamId_fkey";
|
|
|
|
|
|
|
|
-- AddForeignKey
|
|
|
|
ALTER TABLE "EventType" ADD CONSTRAINT "EventType_userId_fkey" FOREIGN KEY ("userId") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
|
|
|
|
|
|
-- AddForeignKey
|
|
|
|
ALTER TABLE "EventType" ADD CONSTRAINT "EventType_teamId_fkey" FOREIGN KEY ("teamId") REFERENCES "Team"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
|
|
|
|
|
|
-- AddForeignKey
|
|
|
|
ALTER TABLE "DestinationCalendar" ADD CONSTRAINT "DestinationCalendar_eventTypeId_fkey" FOREIGN KEY ("eventTypeId") REFERENCES "EventType"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
|
|
|
|
|
|
-- AddForeignKey
|
|
|
|
ALTER TABLE "DestinationCalendar" ADD CONSTRAINT "DestinationCalendar_userId_fkey" FOREIGN KEY ("userId") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
|
|
|
|
|
|
-- AddForeignKey
|
|
|
|
ALTER TABLE "DestinationCalendar" ADD CONSTRAINT "DestinationCalendar_bookingId_fkey" FOREIGN KEY ("bookingId") REFERENCES "Booking"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
|
|
|
|
|
|
-- AddForeignKey
|
|
|
|
ALTER TABLE "Membership" ADD CONSTRAINT "Membership_teamId_fkey" FOREIGN KEY ("teamId") REFERENCES "Team"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
|
|
|
|
|
|
-- AddForeignKey
|
|
|
|
ALTER TABLE "EventTypeCustomInput" ADD CONSTRAINT "EventTypeCustomInput_eventTypeId_fkey" FOREIGN KEY ("eventTypeId") REFERENCES "EventType"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|