chore(src/notifications): remove DeadlineReminderLog migration and related index migrations

Removed the DeadlineReminderLog migration and its index migration files to clean up obsolete code and eliminate migration conflicts.
This commit is contained in:
sankalp committed 2026-06-28 16:12:09 +05:45
1 parent 2e1add0a54
commit 61ff8f4d42
3 files changed
-145

No files matched your search

@@ -1,118 +0,0 @@
# Generated by Django 6.0.6 on 2026-06-28 07:26
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
("tickets", "0001_initial"),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name="DeadlineReminderLog",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
(
"days_before",
models.IntegerField(
help_text="How many days before the deadline this reminder was sent"
),
),
("sent_at", models.DateTimeField(auto_now_add=True)),
(
"ticket",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="deadline_reminders",
to="tickets.ticket",
),
),
(
"user",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="deadline_reminders",
to=settings.AUTH_USER_MODEL,
),
),
],
options={
"verbose_name": "Deadline Reminder Log",
"verbose_name_plural": "Deadline Reminder Logs",
"db_table": "deadline_reminder_log",
"constraints": [
models.UniqueConstraint(
fields=("ticket", "user", "days_before"),
name="unique_ticket_user_days_reminder",
)
],
},
),
migrations.CreateModel(
name="Notification",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
(
"type",
models.CharField(
help_text="e.g. comment_added, project_assigned", max_length=255
),
),
("title", models.CharField(max_length=255)),
("message", models.TextField(blank=True, null=True)),
(
"data",
models.JSONField(
blank=True,
help_text="Arbitrary payload e.g. ticket_id, comment_id",
null=True,
),
),
("read_at", models.DateTimeField(blank=True, null=True)),
("created_at", models.DateTimeField(auto_now_add=True)),
("updated_at", models.DateTimeField(auto_now=True)),
(
"user",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="notifications",
to=settings.AUTH_USER_MODEL,
),
),
],
options={
"verbose_name": "Notification",
"verbose_name_plural": "Notifications",
"db_table": "notifications",
"ordering": ("-created_at",),
"indexes": [
models.Index(
fields=["user", "read_at"],
name="notificatio_user_id_6c7360_idx",
)
],
},
),
]
@@ -1,27 +0,0 @@
# Generated by Django 6.0.6 on 2026-06-28 10:14
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("notifications", "0001_initial"),
("tickets", "0002_ticketcomment_ticket_comm_ticket__5ef05d_idx_and_more"),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.AddIndex(
model_name="deadlinereminderlog",
index=models.Index(
fields=["ticket", "user"], name="deadline_re_ticket__850437_idx"
),
),
migrations.AddIndex(
model_name="notification",
index=models.Index(
fields=["user", "created_at"], name="notificatio_user_id_7336fd_idx"
),
),
]
Whitespace-only changes.