|
| 1 | +# Generated by Django 2.2.28 on 2023-03-22 16:21 |
| 2 | + |
| 3 | +import django.db.models.deletion |
| 4 | +import django.utils.timezone |
| 5 | +from django.db import migrations, models |
| 6 | + |
| 7 | +import sentry.db.models.fields.array |
| 8 | +import sentry.db.models.fields.bounded |
| 9 | +import sentry.db.models.fields.foreignkey |
| 10 | +from sentry.new_migrations.migrations import CheckedMigration |
| 11 | + |
| 12 | + |
| 13 | +class Migration(CheckedMigration): |
| 14 | + # This flag is used to mark that a migration shouldn't be automatically run in production. For |
| 15 | + # the most part, this should only be used for operations where it's safe to run the migration |
| 16 | + # after your code has deployed. So this should not be used for most operations that alter the |
| 17 | + # schema of a table. |
| 18 | + # Here are some things that make sense to mark as dangerous: |
| 19 | + # - Large data migrations. Typically we want these to be run manually by ops so that they can |
| 20 | + # be monitored and not block the deploy for a long period of time while they run. |
| 21 | + # - Adding indexes to large tables. Since this can take a long time, we'd generally prefer to |
| 22 | + # have ops run this and not block the deploy. Note that while adding an index is a schema |
| 23 | + # change, it's completely safe to run the operation after the code has deployed. |
| 24 | + is_dangerous = False |
| 25 | + |
| 26 | + dependencies = [ |
| 27 | + ("sentry", "0392_add_date_uploaded_field_to_bundle"), |
| 28 | + ] |
| 29 | + |
| 30 | + operations = [ |
| 31 | + migrations.CreateModel( |
| 32 | + name="GroupForecast", |
| 33 | + fields=[ |
| 34 | + ( |
| 35 | + "id", |
| 36 | + sentry.db.models.fields.bounded.BoundedBigAutoField( |
| 37 | + primary_key=True, serialize=False |
| 38 | + ), |
| 39 | + ), |
| 40 | + ("forecast", sentry.db.models.fields.array.ArrayField(null=True)), |
| 41 | + ("date_added", models.DateTimeField(default=django.utils.timezone.now)), |
| 42 | + ( |
| 43 | + "group", |
| 44 | + sentry.db.models.fields.foreignkey.FlexibleForeignKey( |
| 45 | + on_delete=django.db.models.deletion.CASCADE, to="sentry.Group", unique=True |
| 46 | + ), |
| 47 | + ), |
| 48 | + ], |
| 49 | + options={ |
| 50 | + "db_table": "sentry_groupforecast", |
| 51 | + }, |
| 52 | + ), |
| 53 | + ] |
0 commit comments