-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add support to drop db constraints (#1598)
Signed-off-by: Miguel Martinez <[email protected]>
- Loading branch information
Showing
5 changed files
with
21 additions
and
2 deletions.
There are no files selected for viewing
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
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,8 @@ | ||
# do not add automatically foreign keys to the generated migrations | ||
env "dev" { | ||
diff { | ||
skip { | ||
add_foreign_key = true | ||
} | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
app/controlplane/pkg/data/ent/migrate/migrations/20241126164629.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,3 @@ | ||
-- remove constraints for performance reasons | ||
ALTER TABLE public.workflow_run_cas_backends DROP CONSTRAINT workflow_run_cas_backends_workflow_run_id; | ||
ALTER TABLE public.workflow_run_cas_backends DROP CONSTRAINT workflow_run_cas_backends_cas_backend_id; |
3 changes: 3 additions & 0 deletions
3
app/controlplane/pkg/data/ent/migrate/migrations/20241126182209.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,3 @@ | ||
-- remove for performance reasons | ||
ALTER TABLE cas_mappings DROP CONSTRAINT cas_mappings_cas_backends_cas_backend; | ||
ALTER TABLE cas_mappings DROP CONSTRAINT cas_mappings_organizations_organization; |
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