-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cascade delete all step types (#1167)
update schema and migrate
- Loading branch information
1 parent
97443a8
commit 950bf62
Showing
2 changed files
with
62 additions
and
9 deletions.
There are no files selected for viewing
53 changes: 53 additions & 0 deletions
53
api/db/migrations/20240318184029_cascade_delete_all_step_types/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
-- DropForeignKey | ||
ALTER TABLE "NftCheckDatum" DROP CONSTRAINT "NftCheckDatum_stepNftCheckId_fkey"; | ||
|
||
-- DropForeignKey | ||
ALTER TABLE "StepAssetTransfer" DROP CONSTRAINT "StepAssetTransfer_stepId_fkey"; | ||
|
||
-- DropForeignKey | ||
ALTER TABLE "StepComethApi" DROP CONSTRAINT "StepComethApi_stepId_fkey"; | ||
|
||
-- DropForeignKey | ||
ALTER TABLE "StepErc20Balance" DROP CONSTRAINT "StepErc20Balance_stepId_fkey"; | ||
|
||
-- DropForeignKey | ||
ALTER TABLE "StepFunctionCall" DROP CONSTRAINT "StepFunctionCall_stepId_fkey"; | ||
|
||
-- DropForeignKey | ||
ALTER TABLE "StepLensApi" DROP CONSTRAINT "StepLensApi_stepId_fkey"; | ||
|
||
-- DropForeignKey | ||
ALTER TABLE "StepNftCheck" DROP CONSTRAINT "StepNftCheck_stepId_fkey"; | ||
|
||
-- DropForeignKey | ||
ALTER TABLE "StepOriumApi" DROP CONSTRAINT "StepOriumApi_stepId_fkey"; | ||
|
||
-- DropForeignKey | ||
ALTER TABLE "StepTokenIdRange" DROP CONSTRAINT "StepTokenIdRange_stepId_fkey"; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "StepFunctionCall" ADD CONSTRAINT "StepFunctionCall_stepId_fkey" FOREIGN KEY ("stepId") REFERENCES "Step"("id") ON DELETE CASCADE ON UPDATE CASCADE; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "NftCheckDatum" ADD CONSTRAINT "NftCheckDatum_stepNftCheckId_fkey" FOREIGN KEY ("stepNftCheckId") REFERENCES "StepNftCheck"("id") ON DELETE CASCADE ON UPDATE CASCADE; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "StepNftCheck" ADD CONSTRAINT "StepNftCheck_stepId_fkey" FOREIGN KEY ("stepId") REFERENCES "Step"("id") ON DELETE CASCADE ON UPDATE CASCADE; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "StepComethApi" ADD CONSTRAINT "StepComethApi_stepId_fkey" FOREIGN KEY ("stepId") REFERENCES "Step"("id") ON DELETE CASCADE ON UPDATE CASCADE; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "StepErc20Balance" ADD CONSTRAINT "StepErc20Balance_stepId_fkey" FOREIGN KEY ("stepId") REFERENCES "Step"("id") ON DELETE CASCADE ON UPDATE CASCADE; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "StepOriumApi" ADD CONSTRAINT "StepOriumApi_stepId_fkey" FOREIGN KEY ("stepId") REFERENCES "Step"("id") ON DELETE CASCADE ON UPDATE CASCADE; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "StepTokenIdRange" ADD CONSTRAINT "StepTokenIdRange_stepId_fkey" FOREIGN KEY ("stepId") REFERENCES "Step"("id") ON DELETE CASCADE ON UPDATE CASCADE; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "StepLensApi" ADD CONSTRAINT "StepLensApi_stepId_fkey" FOREIGN KEY ("stepId") REFERENCES "Step"("id") ON DELETE CASCADE ON UPDATE CASCADE; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "StepAssetTransfer" ADD CONSTRAINT "StepAssetTransfer_stepId_fkey" FOREIGN KEY ("stepId") REFERENCES "Step"("id") ON DELETE CASCADE ON UPDATE CASCADE; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters