feat(migration): Add migration for new block and rule models
Introduces EmailBlock, IPBlock, and UsernameRule models with fields for pattern matching, timestamps, and expiration dates. Facilitates blocking and ensuring compliance during registrations.
This commit is contained in:
parent
9c6555b348
commit
e15224ca69
1 changed files with 68 additions and 0 deletions
|
@ -0,0 +1,68 @@
|
|||
# Generated by Django 5.1.3 on 2024-12-21 14:23
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("registration", "0004_userregistration_mod_message_userregistration_notify"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name="EmailBlock",
|
||||
fields=[
|
||||
(
|
||||
"id",
|
||||
models.BigAutoField(
|
||||
auto_created=True,
|
||||
primary_key=True,
|
||||
serialize=False,
|
||||
verbose_name="ID",
|
||||
),
|
||||
),
|
||||
("regex", models.CharField(max_length=1024)),
|
||||
("reason", models.TextField(blank=True, null=True)),
|
||||
("timestamp", models.DateTimeField(auto_now_add=True)),
|
||||
("expires", models.DateTimeField(blank=True, null=True)),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name="IPBlock",
|
||||
fields=[
|
||||
(
|
||||
"id",
|
||||
models.BigAutoField(
|
||||
auto_created=True,
|
||||
primary_key=True,
|
||||
serialize=False,
|
||||
verbose_name="ID",
|
||||
),
|
||||
),
|
||||
("network", models.GenericIPAddressField()),
|
||||
("netmask", models.SmallIntegerField(default=-1)),
|
||||
("reason", models.TextField(blank=True, null=True)),
|
||||
("timestamp", models.DateTimeField(auto_now_add=True)),
|
||||
("expires", models.DateTimeField(blank=True, null=True)),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name="UsernameRule",
|
||||
fields=[
|
||||
(
|
||||
"id",
|
||||
models.BigAutoField(
|
||||
auto_created=True,
|
||||
primary_key=True,
|
||||
serialize=False,
|
||||
verbose_name="ID",
|
||||
),
|
||||
),
|
||||
("regex", models.CharField(max_length=1024)),
|
||||
("reason", models.TextField(blank=True, null=True)),
|
||||
("timestamp", models.DateTimeField(auto_now_add=True)),
|
||||
("expires", models.DateTimeField(blank=True, null=True)),
|
||||
],
|
||||
),
|
||||
]
|
Loading…
Reference in a new issue