-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
87 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Generated by Django 3.0.10 on 2020-09-19 22:58 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('contenttypes', '0002_remove_content_type_name'), | ||
('app', '0013_auto_20200919_0144'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Notification', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('message', models.CharField(help_text='Notification message.', max_length=255, verbose_name='Message')), | ||
('object_id', models.PositiveIntegerField(null=True, verbose_name='Linked Item ID')), | ||
('created', models.DateTimeField(auto_now_add=True, help_text='Date this notification was sent.', verbose_name='Creation Date')), | ||
('content_type', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType', verbose_name='Linked Item Type')), | ||
], | ||
), | ||
migrations.AddField( | ||
model_name='challenge', | ||
name='followers', | ||
field=models.ManyToManyField(help_text='Followers of this project who will receive notifications about it.', related_name='followed_challenges', to='app.Profile', verbose_name='Followers'), | ||
), | ||
migrations.AddField( | ||
model_name='project', | ||
name='followers', | ||
field=models.ManyToManyField(help_text='Followers of this project who will receive notifications about it.', related_name='followed_projects', to='app.Profile', verbose_name='Followers'), | ||
), | ||
migrations.CreateModel( | ||
name='NotificationInstance', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('is_read', models.BooleanField(default=False, help_text='Whether this notification has been read.', verbose_name='Is Read')), | ||
('notification', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='notifications', to='app.Notification')), | ||
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='notifications', to='app.Profile')), | ||
], | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters