Files
pobsync/src/pobsync_backend/migrations/0006_ssh_credentials.py

52 lines
1.7 KiB
Python
Raw Normal View History

# Generated by Django 5.2.14 on 2026-05-19
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("pobsync_backend", "0005_snapshotrecord_base"),
]
operations = [
migrations.CreateModel(
name="SshCredential",
fields=[
("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
("created_at", models.DateTimeField(auto_now_add=True)),
("updated_at", models.DateTimeField(auto_now=True)),
("name", models.CharField(max_length=128, unique=True)),
("private_key", models.TextField()),
("public_key", models.TextField(blank=True)),
("known_hosts", models.TextField(blank=True)),
("notes", models.TextField(blank=True)),
],
options={
"ordering": ["name"],
},
),
migrations.AddField(
model_name="globalconfig",
name="default_ssh_credential",
field=models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
related_name="global_configs",
to="pobsync_backend.sshcredential",
),
),
migrations.AddField(
model_name="hostconfig",
name="ssh_credential",
field=models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
related_name="hosts",
to="pobsync_backend.sshcredential",
),
),
]