|
| 1 | +# Generated by Django 5.2.6 on 2025-09-30 23:14 |
| 2 | + |
| 3 | +import django.db.models.deletion |
| 4 | +from django.db import migrations, models |
| 5 | + |
| 6 | + |
| 7 | +class Migration(migrations.Migration): |
| 8 | + dependencies = [ |
| 9 | + ("contenttypes", "0002_remove_content_type_name"), |
| 10 | + ("owasp", "0052_remove_entitymember_owasp_entit_member__6e516f_idx_and_more"), |
| 11 | + ] |
| 12 | + |
| 13 | + operations = [ |
| 14 | + migrations.CreateModel( |
| 15 | + name="EntityChannel", |
| 16 | + fields=[ |
| 17 | + ( |
| 18 | + "id", |
| 19 | + models.BigAutoField( |
| 20 | + auto_created=True, primary_key=True, serialize=False, verbose_name="ID" |
| 21 | + ), |
| 22 | + ), |
| 23 | + ("channel_id", models.PositiveBigIntegerField()), |
| 24 | + ("entity_id", models.PositiveBigIntegerField()), |
| 25 | + ( |
| 26 | + "is_active", |
| 27 | + models.BooleanField( |
| 28 | + default=True, help_text="Indicates if this channel is active" |
| 29 | + ), |
| 30 | + ), |
| 31 | + ( |
| 32 | + "is_default", |
| 33 | + models.BooleanField( |
| 34 | + default=False, |
| 35 | + help_text="Indicates if this is the main channel for the entity", |
| 36 | + ), |
| 37 | + ), |
| 38 | + ( |
| 39 | + "is_reviewed", |
| 40 | + models.BooleanField( |
| 41 | + default=False, help_text="Indicates if the channel has been reviewed" |
| 42 | + ), |
| 43 | + ), |
| 44 | + ( |
| 45 | + "platform", |
| 46 | + models.CharField( |
| 47 | + choices=[("slack", "Slack")], |
| 48 | + default="slack", |
| 49 | + help_text="Platform of the channel (e.g., Slack)", |
| 50 | + max_length=5, |
| 51 | + ), |
| 52 | + ), |
| 53 | + ( |
| 54 | + "channel_type", |
| 55 | + models.ForeignKey( |
| 56 | + on_delete=django.db.models.deletion.CASCADE, |
| 57 | + related_name="+", |
| 58 | + to="contenttypes.contenttype", |
| 59 | + ), |
| 60 | + ), |
| 61 | + ( |
| 62 | + "entity_type", |
| 63 | + models.ForeignKey( |
| 64 | + on_delete=django.db.models.deletion.CASCADE, |
| 65 | + related_name="+", |
| 66 | + to="contenttypes.contenttype", |
| 67 | + ), |
| 68 | + ), |
| 69 | + ], |
| 70 | + options={ |
| 71 | + "verbose_name": "Entity channel", |
| 72 | + "verbose_name_plural": "Entity channels", |
| 73 | + "db_table": "owasp_entity_channels", |
| 74 | + "unique_together": {("channel_id", "channel_type", "entity_id", "entity_type")}, |
| 75 | + }, |
| 76 | + ), |
| 77 | + ] |
0 commit comments