Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion migrations_lockfile.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ahead of you.
To resolve this, rebase against latest master and regenerate your migration. This file
will then be regenerated, and you should be able to merge without conflicts.

jira_ac: 0001_initial
jira_ac: 0002_rm-db-constraint-jira-tenant
nodestore: 0002_nodestore_no_dictfield
sentry: 0227_backfill_visits
social_auth: 0001_initial
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Generated by Django 2.1.15 on 2021-09-01 17:44

import django.db.models.deletion
from django.db import migrations

import sentry.db.models.fields.foreignkey


class Migration(migrations.Migration):
# This flag is used to mark that a migration shouldn't be automatically run in
# production. We set this to True for operations that we think are risky and want
# someone from ops to run manually and monitor.
# General advice is that if in doubt, mark your migration as `is_dangerous`.
# Some things you should always mark as dangerous:
# - Large data migrations. Typically we want these to be run manually by ops so that
# they can be monitored. Since data migrations will now hold a transaction open
# this is even more important.
# - Adding columns to highly active tables, even ones that are NULL.
is_dangerous = False

# This flag is used to decide whether to run this migration in a transaction or not.
# By default we prefer to run in a transaction, but for migrations where you want
# to `CREATE INDEX CONCURRENTLY` this needs to be set to False. Typically you'll
# want to create an index concurrently when adding one to an existing table.
# You'll also usually want to set this to `False` if you're writing a data
# migration, since we don't want the entire migration to run in one long-running
# transaction.
atomic = True

dependencies = [
("jira_ac", "0001_initial"),
]

operations = [
migrations.AlterField(
model_name="jiratenant",
name="organization",
field=sentry.db.models.fields.foreignkey.FlexibleForeignKey(
blank=True,
db_constraint=False,
null=True,
on_delete=django.db.models.deletion.CASCADE,
related_name="jira_tenant_set",
to="sentry.Organization",
),
),
]
6 changes: 5 additions & 1 deletion src/sentry_plugins/jira_ac/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
class JiraTenant(Model):
__include_in_export__ = False
organization = FlexibleForeignKey(
"sentry.Organization", null=True, blank=True, related_name="jira_tenant_set"
"sentry.Organization",
null=True,
blank=True,
related_name="jira_tenant_set",
db_constraint=False,
)
client_key = models.CharField(max_length=50, unique=True)
secret = models.CharField(max_length=100)
Expand Down