Skip to content

Commit

Permalink
fix(crons): Remove db constraint from historical migrations for monit…
Browse files Browse the repository at this point in the history
…or environment (#66265)

These constraints are causing migrations to fail in getsentry, where
we've set up the router to move these tables to a separate database.
  • Loading branch information
wedamija authored Mar 4, 2024
1 parent c6f37f5 commit 04dba78
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9158,7 +9158,9 @@ class Migration(CheckedMigration):
(
"environment",
sentry.db.models.fields.foreignkey.FlexibleForeignKey(
on_delete=django.db.models.deletion.CASCADE, to="sentry.Environment"
on_delete=django.db.models.deletion.CASCADE,
to="sentry.Environment",
db_constraint=False,
),
),
(
Expand Down
4 changes: 3 additions & 1 deletion src/sentry/migrations/0361_monitor_environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ class Migration(CheckedMigration):
(
"environment",
sentry.db.models.fields.foreignkey.FlexibleForeignKey(
on_delete=django.db.models.deletion.CASCADE, to="sentry.Environment"
on_delete=django.db.models.deletion.CASCADE,
to="sentry.Environment",
db_constraint=False,
),
),
(
Expand Down

0 comments on commit 04dba78

Please sign in to comment.