frogress/frog_api/migrations/0001_initial.py

70 lines
2.6 KiB
Python
Raw Normal View History

2022-08-19 10:35:05 +00:00
# Generated by Django 4.1 on 2022-08-19 09:01
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies: list[tuple[str, str]] = []
2022-08-19 10:35:05 +00:00
operations = [
migrations.CreateModel(
name="Project",
fields=[
("id", models.AutoField(primary_key=True, serialize=False)),
("created_on", models.DateTimeField(auto_now_add=True)),
("last_updated", models.DateTimeField(auto_now=True)),
("slug", models.SlugField(max_length=255, unique=True)),
("name", models.CharField(max_length=255)),
("auth_key", models.CharField(max_length=255)),
],
),
migrations.CreateModel(
name="Version",
fields=[
("id", models.AutoField(primary_key=True, serialize=False)),
("created_on", models.DateTimeField(auto_now_add=True)),
("last_updated", models.DateTimeField(auto_now=True)),
("slug", models.SlugField(max_length=255)),
("name", models.CharField(max_length=255)),
(
"project",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
to="frog_api.project",
),
),
],
),
migrations.CreateModel(
name="Entry",
fields=[
("id", models.AutoField(primary_key=True, serialize=False)),
("created_on", models.DateTimeField(auto_now_add=True)),
("last_updated", models.DateTimeField(auto_now=True)),
("timestamp", models.DateTimeField()),
("git_hash", models.CharField(max_length=40)),
("total_functions", models.IntegerField()),
("decompiled_functions", models.IntegerField()),
("matching_functions", models.IntegerField()),
("total_bytes", models.IntegerField()),
("decompiled_bytes", models.IntegerField()),
("matching_bytes", models.IntegerField()),
("other_data", models.JSONField(blank=True, null=True)),
(
"version",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
to="frog_api.version",
),
),
],
options={
"ordering": ["-timestamp"],
},
),
]