|
| 1 | +# -*- coding: utf-8 -*- |
| 2 | +# Generated by Django 1.9.13 on 2020-01-08 06:35 |
| 3 | +from __future__ import unicode_literals |
| 4 | + |
| 5 | +from django.conf import settings |
| 6 | +from django.db import migrations |
| 7 | +import django.db.models.deletion |
| 8 | +import sentry.db.models.fields.foreignkey |
| 9 | + |
| 10 | + |
| 11 | +class Migration(migrations.Migration): |
| 12 | + # This flag is used to mark that a migration shouldn't be automatically run in |
| 13 | + # production. We set this to True for operations that we think are risky and want |
| 14 | + # someone from ops to run manually and monitor. |
| 15 | + # General advice is that if in doubt, mark your migration as `is_dangerous`. |
| 16 | + # Some things you should always mark as dangerous: |
| 17 | + # - Adding indexes to large tables. These indexes should be created concurrently, |
| 18 | + # unfortunately we can't run migrations outside of a transaction until Django |
| 19 | + # 1.10. So until then these should be run manually. |
| 20 | + # - Large data migrations. Typically we want these to be run manually by ops so that |
| 21 | + # they can be monitored. Since data migrations will now hold a transaction open |
| 22 | + # this is even more important. |
| 23 | + # - Adding columns to highly active tables, even ones that are NULL. |
| 24 | + is_dangerous = False |
| 25 | + |
| 26 | + |
| 27 | + dependencies = [ |
| 28 | + ('sentry', '0024_auto_20191230_2052'), |
| 29 | + ] |
| 30 | + |
| 31 | + operations = [ |
| 32 | + migrations.AddField( |
| 33 | + model_name='organizationaccessrequest', |
| 34 | + name='requester', |
| 35 | + field=sentry.db.models.fields.foreignkey.FlexibleForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), |
| 36 | + ), |
| 37 | + ] |
| 38 | + |
| 39 | + |
| 40 | +# BEGIN; |
| 41 | +# -- |
| 42 | +# -- Add field requester to organizationaccessrequest |
| 43 | +# -- |
| 44 | +# ALTER TABLE "sentry_organizationaccessrequest" ADD COLUMN "requester_id" integer NULL; |
| 45 | +# ALTER TABLE "sentry_organizationaccessrequest" ALTER COLUMN "requester_id" DROP DEFAULT; |
| 46 | +# CREATE INDEX "sentry_organizationaccessrequest_573f8683" ON "sentry_organizationaccessrequest" ("requester_id"); |
| 47 | +# ALTER TABLE "sentry_organizationaccessrequest" ADD CONSTRAINT "sentry_organizationaccess_requester_id_73de4b1e_fk_auth_user_id" FOREIGN KEY ("requester_id") REFERENCES "auth_user" ("id") DEFERRABLE INITIALLY DEFERRED; |
| 48 | + |
| 49 | +# COMMIT; |
0 commit comments