mirror of
https://github.com/ArchiveBox/ArchiveBox
synced 2024-11-22 04:03:06 +00:00
add machine migrations
This commit is contained in:
parent
b072fd8ef4
commit
aae9deccc2
3 changed files with 174 additions and 0 deletions
|
@ -0,0 +1,75 @@
|
|||
# Generated by Django 5.1.1 on 2024-10-03 07:25
|
||||
|
||||
import archivebox.abid_utils.models
|
||||
import charidfield.fields
|
||||
import django.db.models.deletion
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("machine", "0001_initial"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name="machine",
|
||||
name="stats",
|
||||
field=models.JSONField(default=dict),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name="InstalledBinary",
|
||||
fields=[
|
||||
(
|
||||
"id",
|
||||
models.UUIDField(
|
||||
default=None,
|
||||
editable=False,
|
||||
primary_key=True,
|
||||
serialize=False,
|
||||
unique=True,
|
||||
verbose_name="ID",
|
||||
),
|
||||
),
|
||||
(
|
||||
"abid",
|
||||
charidfield.fields.CharIDField(
|
||||
blank=True,
|
||||
db_index=True,
|
||||
default=None,
|
||||
help_text="ABID-format identifier for this entity (e.g. snp_01BJQMF54D093DXEAWZ6JYRPAQ)",
|
||||
max_length=30,
|
||||
null=True,
|
||||
prefix="bin_",
|
||||
unique=True,
|
||||
),
|
||||
),
|
||||
(
|
||||
"created_at",
|
||||
archivebox.abid_utils.models.AutoDateTimeField(
|
||||
db_index=True, default=None
|
||||
),
|
||||
),
|
||||
("modified_at", models.DateTimeField(auto_now=True)),
|
||||
("name", models.CharField(default=None, max_length=63)),
|
||||
("binprovider", models.CharField(default=None, max_length=31)),
|
||||
("abspath", models.CharField(default=None, max_length=255)),
|
||||
("version", models.CharField(default=None, max_length=32)),
|
||||
("sha256", models.CharField(default=None, max_length=64)),
|
||||
(
|
||||
"machine",
|
||||
models.ForeignKey(
|
||||
default=None,
|
||||
on_delete=django.db.models.deletion.CASCADE,
|
||||
to="machine.machine",
|
||||
),
|
||||
),
|
||||
],
|
||||
options={
|
||||
"unique_together": {
|
||||
("machine", "name", "binprovider", "abspath", "version", "sha256")
|
||||
},
|
||||
},
|
||||
),
|
||||
]
|
|
@ -0,0 +1,50 @@
|
|||
# Generated by Django 5.1.1 on 2024-10-03 09:20
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("machine", "0002_alter_machine_stats_installedbinary"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name="installedbinary",
|
||||
options={
|
||||
"verbose_name": "Installed Binary",
|
||||
"verbose_name_plural": "Installed Binaries",
|
||||
},
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name="installedbinary",
|
||||
name="num_uses_failed",
|
||||
field=models.PositiveIntegerField(default=0),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name="installedbinary",
|
||||
name="num_uses_succeeded",
|
||||
field=models.PositiveIntegerField(default=0),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name="machine",
|
||||
name="num_uses_failed",
|
||||
field=models.PositiveIntegerField(default=0),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name="machine",
|
||||
name="num_uses_succeeded",
|
||||
field=models.PositiveIntegerField(default=0),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name="networkinterface",
|
||||
name="num_uses_failed",
|
||||
field=models.PositiveIntegerField(default=0),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name="networkinterface",
|
||||
name="num_uses_succeeded",
|
||||
field=models.PositiveIntegerField(default=0),
|
||||
),
|
||||
]
|
|
@ -0,0 +1,49 @@
|
|||
# Generated by Django 5.1.1 on 2024-10-03 09:50
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("machine", "0003_alter_installedbinary_options_and_more"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name="installedbinary",
|
||||
name="abspath",
|
||||
field=models.CharField(blank=True, default=None, max_length=255),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="installedbinary",
|
||||
name="binprovider",
|
||||
field=models.CharField(blank=True, default=None, max_length=31),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="installedbinary",
|
||||
name="machine",
|
||||
field=models.ForeignKey(
|
||||
blank=True,
|
||||
default=None,
|
||||
on_delete=django.db.models.deletion.CASCADE,
|
||||
to="machine.machine",
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="installedbinary",
|
||||
name="name",
|
||||
field=models.CharField(blank=True, default=None, max_length=63),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="installedbinary",
|
||||
name="sha256",
|
||||
field=models.CharField(blank=True, default=None, max_length=64),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="installedbinary",
|
||||
name="version",
|
||||
field=models.CharField(blank=True, default=None, max_length=32),
|
||||
),
|
||||
]
|
Loading…
Reference in a new issue