Notification emails #80
31
notifications/migrations/0001_initial.py
Normal file
31
notifications/migrations/0001_initial.py
Normal file
@ -0,0 +1,31 @@
|
||||
# Generated by Django 4.2.11 on 2024-04-12 18:14
|
||||
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
('actstream', '0003_add_follow_flag'),
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Notification',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('recipient', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
||||
('action', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='actstream.action')),
|
||||
('sent', models.BooleanField(default=False)),
|
||||
('processed_by_mailer_at', models.DateTimeField(default=None, null=True)),
|
||||
],
|
||||
options={
|
||||
'unique_together': {('recipient', 'action')},
|
||||
},
|
||||
),
|
||||
]
|
0
notifications/migrations/__init__.py
Normal file
0
notifications/migrations/__init__.py
Normal file
@ -19,8 +19,8 @@ class Notification(models.Model):
|
||||
|
||||
recipient = models.ForeignKey(User, null=False, on_delete=models.CASCADE)
|
||||
action = models.ForeignKey(Action, null=False, on_delete=models.CASCADE)
|
||||
processed_by_mailer_at = models.DateTimeField(default=None, null=True)
|
||||
sent = models.BooleanField(default=False, null=False)
|
||||
processed_by_mailer_at = models.DateTimeField(default=None, null=True)
|
||||
|
||||
class Meta:
|
||||
unique_together = ['recipient', 'action']
|
||||
|
Loading…
Reference in New Issue
Block a user