-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Track events so that we can generate update digests later
Refs #8.
- Loading branch information
Showing
4 changed files
with
196 additions
and
1 deletion.
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
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,97 @@ | ||
# Generated by Django 5.1b1 on 2024-07-17 17:54 | ||
|
||
import django.db.models.deletion | ||
from django.conf import settings | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("projects", "0003_project__email_domains"), | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="Event", | ||
fields=[ | ||
( | ||
"id", | ||
models.BigAutoField( | ||
auto_created=True, | ||
primary_key=True, | ||
serialize=False, | ||
verbose_name="ID", | ||
), | ||
), | ||
( | ||
"created_at", | ||
models.DateTimeField(auto_now_add=True, verbose_name="created at"), | ||
), | ||
( | ||
"action", | ||
models.CharField( | ||
choices=[ | ||
("catalog-created", "created catalog"), | ||
("catalog-updated", "updated catalog"), | ||
("catalog-submitted", "submitted catalog"), | ||
("catalog-replaced", "replaced catalog"), | ||
("catalog-deleted", "deleted catalog"), | ||
], | ||
max_length=20, | ||
verbose_name="action", | ||
), | ||
), | ||
( | ||
"user_string", | ||
models.CharField(max_length=1000, verbose_name="user string"), | ||
), | ||
( | ||
"project_string", | ||
models.CharField(max_length=1000, verbose_name="project string"), | ||
), | ||
( | ||
"catalog_string", | ||
models.CharField(max_length=1000, verbose_name="catalog string"), | ||
), | ||
( | ||
"catalog", | ||
models.ForeignKey( | ||
blank=True, | ||
null=True, | ||
on_delete=django.db.models.deletion.SET_NULL, | ||
related_name="events", | ||
to="projects.catalog", | ||
verbose_name="catalog", | ||
), | ||
), | ||
( | ||
"project", | ||
models.ForeignKey( | ||
blank=True, | ||
null=True, | ||
on_delete=django.db.models.deletion.SET_NULL, | ||
related_name="events", | ||
to="projects.project", | ||
verbose_name="project", | ||
), | ||
), | ||
( | ||
"user", | ||
models.ForeignKey( | ||
blank=True, | ||
null=True, | ||
on_delete=django.db.models.deletion.SET_NULL, | ||
related_name="events", | ||
to=settings.AUTH_USER_MODEL, | ||
verbose_name="user", | ||
), | ||
), | ||
], | ||
options={ | ||
"verbose_name": "event", | ||
"verbose_name_plural": "events", | ||
"ordering": ["-created_at"], | ||
}, | ||
), | ||
] |
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
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