Files
website-v2/libraries/migrations/0010_commitdata.py
2023-05-26 09:48:55 -07:00

61 lines
1.9 KiB
Python

# Generated by Django 4.2.1 on 2023-05-25 19:32
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
("libraries", "0009_library_first_github_tag_date"),
]
operations = [
migrations.CreateModel(
name="CommitData",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
(
"commit_count",
models.IntegerField(
default=0,
help_text="The number of commits made during the month.",
),
),
(
"month_year",
models.DateField(
help_text="The month and year when the commits were made. Day is always set to the first of the month."
),
),
(
"branch",
models.CharField(
default="master",
help_text="The GitHub branch to which these commits were made.",
max_length=256,
),
),
(
"library",
models.ForeignKey(
help_text="The Library to which these commits belong.",
on_delete=django.db.models.deletion.CASCADE,
to="libraries.library",
),
),
],
options={
"unique_together": {("library", "month_year", "branch")},
},
),
]