mirror of https://github.com/jumpserver/jumpserver
245 lines
8.2 KiB
Python
245 lines
8.2 KiB
Python
# Generated by Django 4.1.13 on 2024-11-01 10:24
|
|
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
import uuid
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
("assets", "0006_baseautomation_start_time"),
|
|
("accounts", "0004_alter_changesecretrecord_account_and_more"),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name="AccountCheckAutomation",
|
|
fields=[
|
|
(
|
|
"baseautomation_ptr",
|
|
models.OneToOneField(
|
|
auto_created=True,
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
parent_link=True,
|
|
primary_key=True,
|
|
serialize=False,
|
|
to="assets.baseautomation",
|
|
),
|
|
),
|
|
],
|
|
options={
|
|
"verbose_name": "Gather account automation",
|
|
},
|
|
bases=("accounts.accountbaseautomation",),
|
|
),
|
|
migrations.AddField(
|
|
model_name="account",
|
|
name="change_secret_status",
|
|
field=models.CharField(
|
|
blank=True,
|
|
max_length=16,
|
|
null=True,
|
|
verbose_name="Change secret status",
|
|
),
|
|
),
|
|
migrations.AddField(
|
|
model_name="account",
|
|
name="date_change_secret",
|
|
field=models.DateTimeField(
|
|
blank=True, null=True, verbose_name="Date change secret"
|
|
),
|
|
),
|
|
migrations.AddField(
|
|
model_name="account",
|
|
name="date_last_login",
|
|
field=models.DateTimeField(
|
|
blank=True, null=True, verbose_name="Date last access"
|
|
),
|
|
),
|
|
migrations.AddField(
|
|
model_name="account",
|
|
name="login_by",
|
|
field=models.CharField(
|
|
blank=True, max_length=128, null=True, verbose_name="Access by"
|
|
),
|
|
),
|
|
migrations.AddField(
|
|
model_name="account",
|
|
name="secret_reset",
|
|
field=models.BooleanField(default=True, verbose_name="Secret reset"),
|
|
),
|
|
migrations.AddField(
|
|
model_name="accountbackupautomation",
|
|
name="start_time",
|
|
field=models.DateTimeField(
|
|
blank=True,
|
|
help_text="Datetime when the schedule should begin triggering the task to run",
|
|
null=True,
|
|
verbose_name="Start Datetime",
|
|
),
|
|
),
|
|
migrations.AddField(
|
|
model_name="gatheredaccount",
|
|
name="authorized_keys",
|
|
field=models.TextField(
|
|
blank=True, default="", verbose_name="Authorized keys"
|
|
),
|
|
),
|
|
migrations.AddField(
|
|
model_name="gatheredaccount",
|
|
name="groups",
|
|
field=models.TextField(blank=True, default="", verbose_name="Groups"),
|
|
),
|
|
migrations.AddField(
|
|
model_name="gatheredaccount",
|
|
name="remote_present",
|
|
field=models.BooleanField(default=True, verbose_name="Remote present"),
|
|
),
|
|
migrations.AddField(
|
|
model_name="gatheredaccount",
|
|
name="status",
|
|
field=models.CharField(
|
|
blank=True,
|
|
choices=[("confirmed", "Confirmed"), ("ignored", "Ignored"), ("pending", "Pending")],
|
|
default="",
|
|
max_length=32,
|
|
verbose_name="Status",
|
|
),
|
|
),
|
|
migrations.AddField(
|
|
model_name="gatheredaccount",
|
|
name="sudoers",
|
|
field=models.TextField(blank=True, default="", verbose_name="Sudoers"),
|
|
),
|
|
migrations.AlterField(
|
|
model_name="account",
|
|
name="connectivity",
|
|
field=models.CharField(
|
|
choices=[
|
|
("-", "Unknown"),
|
|
("na", "N/A"),
|
|
("ok", "OK"),
|
|
("err", "Error"),
|
|
],
|
|
default="-",
|
|
max_length=16,
|
|
verbose_name="Connectivity",
|
|
),
|
|
),
|
|
migrations.AlterField(
|
|
model_name="gatheredaccount",
|
|
name="present",
|
|
field=models.BooleanField(default=False, verbose_name="Present"),
|
|
),
|
|
migrations.CreateModel(
|
|
name="GatheredAccountDiff",
|
|
fields=[
|
|
(
|
|
"id",
|
|
models.BigAutoField(
|
|
auto_created=True,
|
|
primary_key=True,
|
|
serialize=False,
|
|
verbose_name="ID",
|
|
),
|
|
),
|
|
("diff", models.TextField(default="", verbose_name="Diff")),
|
|
(
|
|
"item",
|
|
models.CharField(default="", max_length=32, verbose_name="Item"),
|
|
),
|
|
(
|
|
"date_created",
|
|
models.DateTimeField(
|
|
auto_now_add=True, verbose_name="Date created"
|
|
),
|
|
),
|
|
(
|
|
"account",
|
|
models.ForeignKey(
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
to="accounts.gatheredaccount",
|
|
verbose_name="Gathered account",
|
|
),
|
|
),
|
|
],
|
|
),
|
|
migrations.CreateModel(
|
|
name="AccountRisk",
|
|
fields=[
|
|
(
|
|
"created_by",
|
|
models.CharField(
|
|
blank=True, max_length=128, null=True, verbose_name="Created by"
|
|
),
|
|
),
|
|
(
|
|
"updated_by",
|
|
models.CharField(
|
|
blank=True, max_length=128, null=True, verbose_name="Updated by"
|
|
),
|
|
),
|
|
(
|
|
"date_created",
|
|
models.DateTimeField(
|
|
auto_now_add=True, null=True, verbose_name="Date created"
|
|
),
|
|
),
|
|
(
|
|
"date_updated",
|
|
models.DateTimeField(auto_now=True, verbose_name="Date updated"),
|
|
),
|
|
(
|
|
"comment",
|
|
models.TextField(blank=True, default="", verbose_name="Comment"),
|
|
),
|
|
(
|
|
"id",
|
|
models.UUIDField(
|
|
default=uuid.uuid4, primary_key=True, serialize=False
|
|
),
|
|
),
|
|
(
|
|
"org_id",
|
|
models.CharField(
|
|
blank=True,
|
|
db_index=True,
|
|
default="",
|
|
max_length=36,
|
|
verbose_name="Organization",
|
|
),
|
|
),
|
|
(
|
|
"risk",
|
|
models.CharField(
|
|
choices=[
|
|
("zombie", "Zombie"),
|
|
("ghost", "Ghost"),
|
|
("weak_password", "Weak password"),
|
|
("long_time_no_change", "Long time no change"),
|
|
],
|
|
max_length=128,
|
|
verbose_name="Risk",
|
|
),
|
|
),
|
|
(
|
|
"confirmed",
|
|
models.BooleanField(default=False, verbose_name="Confirmed"),
|
|
),
|
|
(
|
|
"account",
|
|
models.ForeignKey(
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
related_name="risks",
|
|
to="accounts.account",
|
|
verbose_name="Account",
|
|
),
|
|
),
|
|
],
|
|
options={
|
|
"verbose_name": "Account risk",
|
|
},
|
|
),
|
|
]
|