|
4 | 4 |
|
5 | 5 |
|
6 | 6 | class Migration(migrations.Migration): |
7 | | - |
8 | 7 | # pyrefly: ignore [bad-override] |
9 | 8 | initial = True |
10 | 9 |
|
11 | | - dependencies = [ |
12 | | - ] |
| 10 | + dependencies = [] |
13 | 11 |
|
14 | 12 | operations = [ |
15 | 13 | migrations.CreateModel( |
16 | | - name='EmailProvider', |
| 14 | + name="EmailProvider", |
17 | 15 | fields=[ |
18 | | - ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), |
19 | | - ('name', models.CharField(help_text="Name of the email provider (e.g., 'Google Workspace', 'SendGrid')", max_length=100, unique=True)), |
20 | | - ('category', models.CharField(choices=[('EMAIL_HOSTING', 'Email Hosting'), ('TRANSACTIONAL', 'Transactional Email'), ('OTHER', 'Other')], help_text='Category of email provider', max_length=20)), |
21 | | - ('description', models.TextField(blank=True, help_text='Public description of the provider')), |
22 | | - ('mechanism_type', models.CharField(choices=[('include', 'Include'), ('a', 'A Record'), ('mx', 'MX Record'), ('ip4', 'IPv4'), ('ip6', 'IPv6'), ('exists', 'Exists')], help_text='Type of SPF mechanism used', max_length=10)), |
23 | | - ('mechanism_value', models.CharField(help_text="The actual SPF mechanism value (e.g., 'include:_spf.google.com')", max_length=255)), |
24 | | - ('lookup_count', models.PositiveSmallIntegerField(default=1, help_text='Number of DNS lookups this mechanism requires')), |
25 | | - ('priority', models.PositiveSmallIntegerField(default=100, help_text='Order in which this should appear in combined SPF record')), |
26 | | - ('active', models.BooleanField(default=True, help_text='Whether this provider is currently available for selection')), |
27 | | - ('notes', models.TextField(blank=True, help_text='Internal notes about this provider')), |
28 | | - ('created_at', models.DateTimeField(auto_now_add=True)), |
29 | | - ('updated_at', models.DateTimeField(auto_now=True)), |
| 16 | + ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")), |
| 17 | + ( |
| 18 | + "name", |
| 19 | + models.CharField( |
| 20 | + help_text="Name of the email provider (e.g., 'Google Workspace', 'SendGrid')", |
| 21 | + max_length=100, |
| 22 | + unique=True, |
| 23 | + ), |
| 24 | + ), |
| 25 | + ( |
| 26 | + "category", |
| 27 | + models.CharField( |
| 28 | + choices=[ |
| 29 | + ("EMAIL_HOSTING", "Email Hosting"), |
| 30 | + ("TRANSACTIONAL", "Transactional Email"), |
| 31 | + ("OTHER", "Other"), |
| 32 | + ], |
| 33 | + help_text="Category of email provider", |
| 34 | + max_length=20, |
| 35 | + ), |
| 36 | + ), |
| 37 | + ("description", models.TextField(blank=True, help_text="Public description of the provider")), |
| 38 | + ( |
| 39 | + "mechanism_type", |
| 40 | + models.CharField( |
| 41 | + choices=[ |
| 42 | + ("include", "Include"), |
| 43 | + ("a", "A Record"), |
| 44 | + ("mx", "MX Record"), |
| 45 | + ("ip4", "IPv4"), |
| 46 | + ("ip6", "IPv6"), |
| 47 | + ("exists", "Exists"), |
| 48 | + ], |
| 49 | + help_text="Type of SPF mechanism used", |
| 50 | + max_length=10, |
| 51 | + ), |
| 52 | + ), |
| 53 | + ( |
| 54 | + "mechanism_value", |
| 55 | + models.CharField( |
| 56 | + help_text="The actual SPF mechanism value (e.g., 'include:_spf.google.com')", max_length=255 |
| 57 | + ), |
| 58 | + ), |
| 59 | + ( |
| 60 | + "lookup_count", |
| 61 | + models.PositiveSmallIntegerField( |
| 62 | + default=1, help_text="Number of DNS lookups this mechanism requires" |
| 63 | + ), |
| 64 | + ), |
| 65 | + ( |
| 66 | + "priority", |
| 67 | + models.PositiveSmallIntegerField( |
| 68 | + default=100, help_text="Order in which this should appear in combined SPF record" |
| 69 | + ), |
| 70 | + ), |
| 71 | + ( |
| 72 | + "active", |
| 73 | + models.BooleanField( |
| 74 | + default=True, help_text="Whether this provider is currently available for selection" |
| 75 | + ), |
| 76 | + ), |
| 77 | + ("notes", models.TextField(blank=True, help_text="Internal notes about this provider")), |
| 78 | + ("created_at", models.DateTimeField(auto_now_add=True)), |
| 79 | + ("updated_at", models.DateTimeField(auto_now=True)), |
30 | 80 | ], |
31 | 81 | options={ |
32 | | - 'ordering': ['priority', 'name'], |
| 82 | + "ordering": ["priority", "name"], |
33 | 83 | }, |
34 | 84 | ), |
35 | 85 | ] |
0 commit comments