2014-12-17 21:22:37 +01:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
import django.utils.timezone
|
|
|
|
import model_utils.fields
|
2018-11-19 23:28:40 +01:00
|
|
|
from django.db import migrations, models
|
2014-12-17 21:22:37 +01:00
|
|
|
|
|
|
|
|
|
|
|
class Migration(migrations.Migration):
|
2023-02-18 22:46:48 +01:00
|
|
|
dependencies = []
|
2014-12-17 21:22:37 +01:00
|
|
|
|
|
|
|
operations = [
|
|
|
|
migrations.CreateModel(
|
2023-02-18 22:46:48 +01:00
|
|
|
name="AdditionalGroup",
|
2014-12-17 21:22:37 +01:00
|
|
|
fields=[
|
2023-02-18 22:46:48 +01:00
|
|
|
(
|
|
|
|
"id",
|
|
|
|
models.AutoField(
|
|
|
|
verbose_name="ID",
|
|
|
|
serialize=False,
|
|
|
|
auto_created=True,
|
|
|
|
primary_key=True,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"created",
|
|
|
|
model_utils.fields.AutoCreatedField(
|
|
|
|
default=django.utils.timezone.now,
|
|
|
|
verbose_name="created",
|
|
|
|
editable=False,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"modified",
|
|
|
|
model_utils.fields.AutoLastModifiedField(
|
|
|
|
default=django.utils.timezone.now,
|
|
|
|
verbose_name="modified",
|
|
|
|
editable=False,
|
|
|
|
),
|
|
|
|
),
|
2014-12-17 21:22:37 +01:00
|
|
|
],
|
|
|
|
options={
|
2023-02-18 22:46:48 +01:00
|
|
|
"verbose_name": "Additional group",
|
|
|
|
"verbose_name_plural": "Additional groups",
|
2014-12-17 21:22:37 +01:00
|
|
|
},
|
|
|
|
bases=(models.Model,),
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
2023-02-18 22:46:48 +01:00
|
|
|
name="DeleteTaskResult",
|
2014-12-17 21:22:37 +01:00
|
|
|
fields=[
|
2023-02-18 22:46:48 +01:00
|
|
|
(
|
|
|
|
"created",
|
|
|
|
model_utils.fields.AutoCreatedField(
|
|
|
|
default=django.utils.timezone.now,
|
|
|
|
verbose_name="created",
|
|
|
|
editable=False,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"modified",
|
|
|
|
model_utils.fields.AutoLastModifiedField(
|
|
|
|
default=django.utils.timezone.now,
|
|
|
|
verbose_name="modified",
|
|
|
|
editable=False,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"task_uuid",
|
|
|
|
models.CharField(max_length=64, serialize=False, primary_key=True),
|
|
|
|
),
|
|
|
|
("task_name", models.CharField(max_length=255, db_index=True)),
|
|
|
|
("is_finished", models.BooleanField(default=False)),
|
|
|
|
("is_success", models.BooleanField(default=False)),
|
|
|
|
("state", models.CharField(max_length=10)),
|
|
|
|
("result_body", models.TextField(blank=True)),
|
|
|
|
("modeltype", models.CharField(max_length=20, db_index=True)),
|
|
|
|
("modelname", models.CharField(max_length=255)),
|
2014-12-17 21:22:37 +01:00
|
|
|
],
|
|
|
|
options={
|
2023-02-18 22:46:48 +01:00
|
|
|
"abstract": False,
|
2014-12-17 21:22:37 +01:00
|
|
|
},
|
|
|
|
bases=(models.Model,),
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
2023-02-18 22:46:48 +01:00
|
|
|
name="Group",
|
2014-12-17 21:22:37 +01:00
|
|
|
fields=[
|
2023-02-18 22:46:48 +01:00
|
|
|
(
|
|
|
|
"created",
|
|
|
|
model_utils.fields.AutoCreatedField(
|
|
|
|
default=django.utils.timezone.now,
|
|
|
|
verbose_name="created",
|
|
|
|
editable=False,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"modified",
|
|
|
|
model_utils.fields.AutoLastModifiedField(
|
|
|
|
default=django.utils.timezone.now,
|
|
|
|
verbose_name="modified",
|
|
|
|
editable=False,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"groupname",
|
|
|
|
models.CharField(
|
|
|
|
unique=True, max_length=16, verbose_name="Group name"
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"gid",
|
|
|
|
models.PositiveSmallIntegerField(
|
|
|
|
unique=True,
|
|
|
|
serialize=False,
|
|
|
|
verbose_name="Group ID",
|
|
|
|
primary_key=True,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
("descr", models.TextField(verbose_name="Description", blank=True)),
|
|
|
|
(
|
|
|
|
"passwd",
|
|
|
|
models.CharField(
|
|
|
|
max_length=128, verbose_name="Group password", blank=True
|
|
|
|
),
|
|
|
|
),
|
2014-12-17 21:22:37 +01:00
|
|
|
],
|
|
|
|
options={
|
2023-02-18 22:46:48 +01:00
|
|
|
"verbose_name": "Group",
|
|
|
|
"verbose_name_plural": "Groups",
|
2014-12-17 21:22:37 +01:00
|
|
|
},
|
|
|
|
bases=(models.Model,),
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
2023-02-18 22:46:48 +01:00
|
|
|
name="GroupTaskResult",
|
2014-12-17 21:22:37 +01:00
|
|
|
fields=[
|
2023-02-18 22:46:48 +01:00
|
|
|
(
|
|
|
|
"created",
|
|
|
|
model_utils.fields.AutoCreatedField(
|
|
|
|
default=django.utils.timezone.now,
|
|
|
|
verbose_name="created",
|
|
|
|
editable=False,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"modified",
|
|
|
|
model_utils.fields.AutoLastModifiedField(
|
|
|
|
default=django.utils.timezone.now,
|
|
|
|
verbose_name="modified",
|
|
|
|
editable=False,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"task_uuid",
|
|
|
|
models.CharField(max_length=64, serialize=False, primary_key=True),
|
|
|
|
),
|
|
|
|
("task_name", models.CharField(max_length=255, db_index=True)),
|
|
|
|
("is_finished", models.BooleanField(default=False)),
|
|
|
|
("is_success", models.BooleanField(default=False)),
|
|
|
|
("state", models.CharField(max_length=10)),
|
|
|
|
("result_body", models.TextField(blank=True)),
|
|
|
|
(
|
|
|
|
"group",
|
|
|
|
models.ForeignKey(to="osusers.Group", on_delete=models.CASCADE),
|
|
|
|
),
|
2014-12-17 21:22:37 +01:00
|
|
|
],
|
|
|
|
options={
|
2023-02-18 22:46:48 +01:00
|
|
|
"abstract": False,
|
2014-12-17 21:22:37 +01:00
|
|
|
},
|
|
|
|
bases=(models.Model,),
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
2023-02-18 22:46:48 +01:00
|
|
|
name="User",
|
2014-12-17 21:22:37 +01:00
|
|
|
fields=[
|
2023-02-18 22:46:48 +01:00
|
|
|
(
|
|
|
|
"created",
|
|
|
|
model_utils.fields.AutoCreatedField(
|
|
|
|
default=django.utils.timezone.now,
|
|
|
|
verbose_name="created",
|
|
|
|
editable=False,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"modified",
|
|
|
|
model_utils.fields.AutoLastModifiedField(
|
|
|
|
default=django.utils.timezone.now,
|
|
|
|
verbose_name="modified",
|
|
|
|
editable=False,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"username",
|
|
|
|
models.CharField(
|
|
|
|
unique=True, max_length=64, verbose_name="User name"
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"uid",
|
|
|
|
models.PositiveSmallIntegerField(
|
|
|
|
unique=True,
|
|
|
|
serialize=False,
|
|
|
|
verbose_name="User ID",
|
|
|
|
primary_key=True,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"gecos",
|
|
|
|
models.CharField(
|
|
|
|
max_length=128, verbose_name="Gecos field", blank=True
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"homedir",
|
|
|
|
models.CharField(max_length=256, verbose_name="Home directory"),
|
|
|
|
),
|
|
|
|
("shell", models.CharField(max_length=64, verbose_name="Login shell")),
|
2014-12-17 21:22:37 +01:00
|
|
|
],
|
|
|
|
options={
|
2023-02-18 22:46:48 +01:00
|
|
|
"verbose_name": "Benutzer",
|
|
|
|
"verbose_name_plural": "Users",
|
2014-12-17 21:22:37 +01:00
|
|
|
},
|
|
|
|
bases=(models.Model,),
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
2023-02-18 22:46:48 +01:00
|
|
|
name="Shadow",
|
2014-12-17 21:22:37 +01:00
|
|
|
fields=[
|
2023-02-18 22:46:48 +01:00
|
|
|
(
|
|
|
|
"created",
|
|
|
|
model_utils.fields.AutoCreatedField(
|
|
|
|
default=django.utils.timezone.now,
|
|
|
|
verbose_name="created",
|
|
|
|
editable=False,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"modified",
|
|
|
|
model_utils.fields.AutoLastModifiedField(
|
|
|
|
default=django.utils.timezone.now,
|
|
|
|
verbose_name="modified",
|
|
|
|
editable=False,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"user",
|
|
|
|
models.OneToOneField(
|
|
|
|
primary_key=True,
|
|
|
|
serialize=False,
|
|
|
|
to="osusers.User",
|
|
|
|
verbose_name="Benutzer",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"passwd",
|
|
|
|
models.CharField(max_length=128, verbose_name="Encrypted password"),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"changedays",
|
|
|
|
models.PositiveSmallIntegerField(
|
|
|
|
help_text="This is expressed in days since Jan 1, 1970",
|
|
|
|
null=True,
|
|
|
|
verbose_name="Date of last change",
|
|
|
|
blank=True,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"minage",
|
|
|
|
models.PositiveSmallIntegerField(
|
|
|
|
help_text="Minimum number of days before the password can "
|
|
|
|
"be changed",
|
|
|
|
null=True,
|
|
|
|
verbose_name="Minimum age",
|
|
|
|
blank=True,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"maxage",
|
|
|
|
models.PositiveSmallIntegerField(
|
|
|
|
help_text="Maximum number of days after which the "
|
|
|
|
"password has to be changed",
|
|
|
|
null=True,
|
|
|
|
verbose_name="Maximum age",
|
|
|
|
blank=True,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"gracedays",
|
|
|
|
models.PositiveSmallIntegerField(
|
|
|
|
help_text="The number of days before the password is "
|
|
|
|
"going to expire",
|
|
|
|
null=True,
|
|
|
|
verbose_name="Grace period",
|
|
|
|
blank=True,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"inactdays",
|
|
|
|
models.PositiveSmallIntegerField(
|
|
|
|
help_text="The number of days after the password has "
|
|
|
|
"expired during which the password should still "
|
|
|
|
"be accepted",
|
|
|
|
null=True,
|
|
|
|
verbose_name="Inactivity period",
|
|
|
|
blank=True,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"expiredays",
|
|
|
|
models.PositiveSmallIntegerField(
|
|
|
|
default=None,
|
|
|
|
help_text="The date of expiration of the account, "
|
|
|
|
"expressed as number of days since Jan 1, 1970",
|
|
|
|
null=True,
|
|
|
|
verbose_name="Account expiration date",
|
|
|
|
blank=True,
|
|
|
|
),
|
|
|
|
),
|
2014-12-17 21:22:37 +01:00
|
|
|
],
|
|
|
|
options={
|
2023-02-18 22:46:48 +01:00
|
|
|
"verbose_name": "Shadow password",
|
|
|
|
"verbose_name_plural": "Shadow passwords",
|
2014-12-17 21:22:37 +01:00
|
|
|
},
|
|
|
|
bases=(models.Model,),
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
2023-02-18 22:46:48 +01:00
|
|
|
name="UserTaskResult",
|
2014-12-17 21:22:37 +01:00
|
|
|
fields=[
|
2023-02-18 22:46:48 +01:00
|
|
|
(
|
|
|
|
"created",
|
|
|
|
model_utils.fields.AutoCreatedField(
|
|
|
|
default=django.utils.timezone.now,
|
|
|
|
verbose_name="created",
|
|
|
|
editable=False,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"modified",
|
|
|
|
model_utils.fields.AutoLastModifiedField(
|
|
|
|
default=django.utils.timezone.now,
|
|
|
|
verbose_name="modified",
|
|
|
|
editable=False,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"task_uuid",
|
|
|
|
models.CharField(max_length=64, serialize=False, primary_key=True),
|
|
|
|
),
|
|
|
|
("task_name", models.CharField(max_length=255, db_index=True)),
|
|
|
|
("is_finished", models.BooleanField(default=False)),
|
|
|
|
("is_success", models.BooleanField(default=False)),
|
|
|
|
("state", models.CharField(max_length=10)),
|
|
|
|
("result_body", models.TextField(blank=True)),
|
|
|
|
(
|
|
|
|
"user",
|
|
|
|
models.ForeignKey(to="osusers.User", on_delete=models.CASCADE),
|
|
|
|
),
|
2014-12-17 21:22:37 +01:00
|
|
|
],
|
|
|
|
options={
|
2023-02-18 22:46:48 +01:00
|
|
|
"abstract": False,
|
2014-12-17 21:22:37 +01:00
|
|
|
},
|
|
|
|
bases=(models.Model,),
|
|
|
|
),
|
|
|
|
migrations.AddField(
|
2023-02-18 22:46:48 +01:00
|
|
|
model_name="user",
|
|
|
|
name="group",
|
2018-11-19 23:28:40 +01:00
|
|
|
field=models.ForeignKey(
|
2023-02-18 22:46:48 +01:00
|
|
|
verbose_name="Group", to="osusers.Group", on_delete=models.CASCADE
|
|
|
|
),
|
2014-12-17 21:22:37 +01:00
|
|
|
preserve_default=True,
|
|
|
|
),
|
|
|
|
migrations.AddField(
|
2023-02-18 22:46:48 +01:00
|
|
|
model_name="additionalgroup",
|
|
|
|
name="group",
|
|
|
|
field=models.ForeignKey(to="osusers.Group", on_delete=models.CASCADE),
|
2014-12-17 21:22:37 +01:00
|
|
|
preserve_default=True,
|
|
|
|
),
|
|
|
|
migrations.AddField(
|
2023-02-18 22:46:48 +01:00
|
|
|
model_name="additionalgroup",
|
|
|
|
name="user",
|
|
|
|
field=models.ForeignKey(to="osusers.User", on_delete=models.CASCADE),
|
2014-12-17 21:22:37 +01:00
|
|
|
preserve_default=True,
|
|
|
|
),
|
|
|
|
migrations.AlterUniqueTogether(
|
2023-02-18 22:46:48 +01:00
|
|
|
name="additionalgroup",
|
|
|
|
unique_together={("user", "group")},
|
2014-12-17 21:22:37 +01:00
|
|
|
),
|
|
|
|
]
|