|
| 1 | +# -*- coding: utf-8 -*- |
| 2 | +# Generated by Django 1.11.29 on 2020-10-15 17:38 |
| 3 | +from __future__ import unicode_literals |
| 4 | + |
| 5 | +from django.db import migrations, models |
| 6 | +import django.db.models.deletion |
| 7 | +import django.utils.timezone |
| 8 | +import sentry.db.models.fields.bounded |
| 9 | +import sentry.db.models.fields.foreignkey |
| 10 | + |
| 11 | + |
| 12 | +class Migration(migrations.Migration): |
| 13 | + # This flag is used to mark that a migration shouldn't be automatically run in |
| 14 | + # production. We set this to True for operations that we think are risky and want |
| 15 | + # someone from ops to run manually and monitor. |
| 16 | + # General advice is that if in doubt, mark your migration as `is_dangerous`. |
| 17 | + # Some things you should always mark as dangerous: |
| 18 | + # - Large data migrations. Typically we want these to be run manually by ops so that |
| 19 | + # they can be monitored. Since data migrations will now hold a transaction open |
| 20 | + # this is even more important. |
| 21 | + # - Adding columns to highly active tables, even ones that are NULL. |
| 22 | + is_dangerous = False |
| 23 | + |
| 24 | + # This flag is used to decide whether to run this migration in a transaction or not. |
| 25 | + # By default we prefer to run in a transaction, but for migrations where you want |
| 26 | + # to `CREATE INDEX CONCURRENTLY` this needs to be set to False. Typically you'll |
| 27 | + # want to create an index concurrently when adding one to an existing table. |
| 28 | + atomic = True |
| 29 | + |
| 30 | + |
| 31 | + dependencies = [ |
| 32 | + ('sentry', '0112_groupinboxmodel'), |
| 33 | + ] |
| 34 | + |
| 35 | + operations = [ |
| 36 | + migrations.CreateModel( |
| 37 | + name='RepositoryProjectPathConfig', |
| 38 | + fields=[ |
| 39 | + ('id', sentry.db.models.fields.bounded.BoundedBigAutoField(primary_key=True, serialize=False)), |
| 40 | + ('date_updated', models.DateTimeField(default=django.utils.timezone.now)), |
| 41 | + ('date_added', models.DateTimeField(default=django.utils.timezone.now, null=True)), |
| 42 | + ('stack_root', models.TextField()), |
| 43 | + ('source_root', models.TextField()), |
| 44 | + ('default_branch', models.TextField(null=True)), |
| 45 | + ('organization_integration', sentry.db.models.fields.foreignkey.FlexibleForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sentry.OrganizationIntegration')), |
| 46 | + ('project', sentry.db.models.fields.foreignkey.FlexibleForeignKey(db_constraint=False, on_delete=django.db.models.deletion.CASCADE, to='sentry.Project')), |
| 47 | + ('repository', sentry.db.models.fields.foreignkey.FlexibleForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sentry.Repository')), |
| 48 | + ], |
| 49 | + options={ |
| 50 | + 'db_table': 'sentry_repositoryprojectpathconfig', |
| 51 | + }, |
| 52 | + ), |
| 53 | + migrations.AlterUniqueTogether( |
| 54 | + name='repositoryprojectpathconfig', |
| 55 | + unique_together=set([('project', 'stack_root')]), |
| 56 | + ), |
| 57 | + ] |
0 commit comments