Skip to content

Commit

Permalink
Add fields for contributors and release information to Repo model (#3161
Browse files Browse the repository at this point in the history
)

* Add fields for contributors and release information to Repo model

* Add fields for contributors and release information to Repo model
  • Loading branch information
JisanAR03 authored Dec 24, 2024
1 parent 77ee8af commit c98a151
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Generated by Django 5.1.3 on 2024-12-24 00:05

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("website", "0175_remove_project_closed_issues_and_more"),
]

operations = [
migrations.AddField(
model_name="repo",
name="contributor",
field=models.ManyToManyField(
blank=True, related_name="repos", to="website.contributor"
),
),
migrations.AddField(
model_name="repo",
name="contributor_count",
field=models.IntegerField(default=0),
),
migrations.AddField(
model_name="repo",
name="logo_url",
field=models.URLField(blank=True, null=True),
),
migrations.AddField(
model_name="repo",
name="release_datetime",
field=models.DateTimeField(blank=True, null=True),
),
migrations.AddField(
model_name="repo",
name="release_name",
field=models.CharField(blank=True, max_length=255, null=True),
),
]
5 changes: 5 additions & 0 deletions website/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1249,6 +1249,11 @@ class Repo(models.Model):
closed_issues = models.IntegerField(default=0)
size = models.IntegerField(default=0)
commit_count = models.IntegerField(default=0)
release_name = models.CharField(max_length=255, null=True, blank=True)
release_datetime = models.DateTimeField(null=True, blank=True)
logo_url = models.URLField(null=True, blank=True)
contributor_count = models.IntegerField(default=0)
contributor = models.ManyToManyField(Contributor, related_name="repos", blank=True)
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)

Expand Down

0 comments on commit c98a151

Please sign in to comment.