aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps/content/migrations
diff options
context:
space:
mode:
authorGravatar Hassan Abouelela <[email protected]>2022-08-16 21:21:59 +0400
committerGravatar Hassan Abouelela <[email protected]>2022-08-16 21:50:42 +0400
commit04babac2f281487adcddbf1e92d9d028896e086e (patch)
treecca6511caa433161c3259c4c562d92b142db7cbe /pydis_site/apps/content/migrations
parentUnify Tag Migrations & Add Commit Model (diff)
Add Tag Metadata
Uses the commit API to obtain tag metadata such as when it was last edited, and by whom. Signed-off-by: Hassan Abouelela <[email protected]>
Diffstat (limited to 'pydis_site/apps/content/migrations')
-rw-r--r--pydis_site/apps/content/migrations/0001_add_tags.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/pydis_site/apps/content/migrations/0001_add_tags.py b/pydis_site/apps/content/migrations/0001_add_tags.py
index 2e9d8c45..73525243 100644
--- a/pydis_site/apps/content/migrations/0001_add_tags.py
+++ b/pydis_site/apps/content/migrations/0001_add_tags.py
@@ -1,4 +1,4 @@
-# Generated by Django 4.0.6 on 2022-08-16 16:17
+# Generated by Django 4.0.6 on 2022-08-16 17:38
import django.db.models.deletion
from django.db import migrations, models
@@ -25,10 +25,11 @@ class Migration(migrations.Migration):
name='Tag',
fields=[
('last_updated', models.DateTimeField(auto_now=True, help_text='The date and time this data was last fetched.')),
+ ('sha', models.CharField(help_text="The tag's hash, as calculated by GitHub.", max_length=40)),
('name', models.CharField(help_text="The tag's name.", max_length=50, primary_key=True, serialize=False)),
('group', models.CharField(help_text='The group the tag belongs to.', max_length=50, null=True)),
('body', models.TextField(help_text='The content of the tag.')),
- ('last_commit', models.OneToOneField(help_text='The commit this file was last touched in.', null=True, on_delete=django.db.models.deletion.CASCADE, to='content.commit')),
+ ('last_commit', models.ForeignKey(help_text='The commit this file was last touched in.', null=True, on_delete=django.db.models.deletion.CASCADE, to='content.commit')),
],
),
]