-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add model for tracking codebase git mirror
* fix release ordering to sort by semantic version number rather than by string
- Loading branch information
Showing
3 changed files
with
123 additions
and
8 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
59 changes: 59 additions & 0 deletions
59
django/library/migrations/0027_codebasegitmirror_codebase_git_mirror.py
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,59 @@ | ||
# Generated by Django 4.2.11 on 2024-05-07 22:25 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("library", "0026_alter_codebasereleaseplatformtag_tag_and_more"), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="CodebaseGitMirror", | ||
fields=[ | ||
( | ||
"id", | ||
models.AutoField( | ||
auto_created=True, | ||
primary_key=True, | ||
serialize=False, | ||
verbose_name="ID", | ||
), | ||
), | ||
("repository_name", models.CharField(max_length=100, unique=True)), | ||
( | ||
"remote_url", | ||
models.URLField( | ||
blank=True, help_text="URL of mirrored remote repository" | ||
), | ||
), | ||
("last_local_update", models.DateTimeField(blank=True, null=True)), | ||
("last_remote_update", models.DateTimeField(blank=True, null=True)), | ||
( | ||
"local_releases", | ||
models.ManyToManyField( | ||
related_name="+", to="library.codebaserelease" | ||
), | ||
), | ||
( | ||
"remote_releases", | ||
models.ManyToManyField( | ||
related_name="+", to="library.codebaserelease" | ||
), | ||
), | ||
], | ||
), | ||
migrations.AddField( | ||
model_name="codebase", | ||
name="git_mirror", | ||
field=models.OneToOneField( | ||
null=True, | ||
on_delete=django.db.models.deletion.SET_NULL, | ||
related_name="codebase", | ||
to="library.codebasegitmirror", | ||
), | ||
), | ||
] |
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