reset migrations

This commit is contained in:
wh1te909 2020-05-31 01:51:05 +00:00
parent 91d505fedc
commit 6a92fd06bd
11 changed files with 455 additions and 0 deletions

View File

@ -0,0 +1,45 @@
# Generated by Django 3.0.6 on 2020-05-31 01:23
import django.contrib.auth.models
import django.contrib.auth.validators
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
dependencies = [
('auth', '0011_update_proxy_permissions'),
]
operations = [
migrations.CreateModel(
name='User',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('password', models.CharField(max_length=128, verbose_name='password')),
('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')),
('first_name', models.CharField(blank=True, max_length=30, verbose_name='first name')),
('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')),
('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')),
('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
('is_active', models.BooleanField(default=True)),
('totp_key', models.CharField(blank=True, max_length=50, null=True)),
('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')),
('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')),
],
options={
'verbose_name': 'user',
'verbose_name_plural': 'users',
'abstract': False,
},
managers=[
('objects', django.contrib.auth.models.UserManager()),
],
),
]

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,28 @@
# Generated by Django 3.0.6 on 2020-05-31 01:23
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
('agents', '0001_initial'),
('clients', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Policy',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=255, unique=True)),
('desc', models.CharField(max_length=255)),
('active', models.BooleanField(default=False)),
('agents', models.ManyToManyField(related_name='policies', to='agents.Agent')),
('clients', models.ManyToManyField(related_name='policies', to='clients.Client')),
('sites', models.ManyToManyField(related_name='policies', to='clients.Site')),
],
),
]

View File

@ -0,0 +1,42 @@
# Generated by Django 3.0.6 on 2020-05-31 01:23
import django.contrib.postgres.fields
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('agents', '0001_initial'),
('automation', '0001_initial'),
('checks', '0001_initial'),
('scripts', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='AutomatedTask',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=255)),
('run_time_days', django.contrib.postgres.fields.ArrayField(base_field=models.IntegerField(blank=True, choices=[(0, 'Monday'), (1, 'Tuesday'), (2, 'Wednesday'), (3, 'Thursday'), (4, 'Friday'), (5, 'Saturday'), (6, 'Sunday')], null=True), blank=True, default=list, null=True, size=None)),
('run_time_minute', models.CharField(blank=True, max_length=5, null=True)),
('task_type', models.CharField(choices=[('scheduled', 'Scheduled'), ('checkfailure', 'On Check Failure'), ('manual', 'Manual')], default='manual', max_length=100)),
('win_task_name', models.CharField(blank=True, max_length=255, null=True)),
('timeout', models.PositiveIntegerField(default=120)),
('retcode', models.IntegerField(blank=True, null=True)),
('stdout', models.TextField(blank=True, null=True)),
('stderr', models.TextField(blank=True, null=True)),
('execution_time', models.CharField(default='0.0000', max_length=100)),
('last_run', models.DateTimeField(blank=True, null=True)),
('enabled', models.BooleanField(default=True)),
('agent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='autotasks', to='agents.Agent')),
('assigned_check', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='assignedtask', to='checks.Check')),
('policy', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='autotasks', to='automation.Policy')),
('script', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='autoscript', to='scripts.Script')),
],
),
]

View File

@ -0,0 +1,62 @@
# Generated by Django 3.0.6 on 2020-05-31 01:23
import django.contrib.postgres.fields
import django.contrib.postgres.fields.jsonb
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('agents', '0001_initial'),
('automation', '0001_initial'),
('scripts', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Check',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(blank=True, max_length=255, null=True)),
('check_type', models.CharField(choices=[('diskspace', 'Disk Space Check'), ('ping', 'Ping Check'), ('cpuload', 'CPU Load Check'), ('memory', 'Memory Check'), ('winsvc', 'Service Check'), ('script', 'Script Check'), ('eventlog', 'Event Log Check')], default='diskspace', max_length=50)),
('status', models.CharField(choices=[('passing', 'Passing'), ('failing', 'Failing'), ('pending', 'Pending')], default='pending', max_length=100)),
('more_info', models.TextField(blank=True, null=True)),
('last_run', models.DateTimeField(blank=True, null=True)),
('email_alert', models.BooleanField(default=False)),
('text_alert', models.BooleanField(default=False)),
('fails_b4_alert', models.PositiveIntegerField(default=1)),
('fail_count', models.PositiveIntegerField(default=0)),
('email_sent', models.DateTimeField(blank=True, null=True)),
('text_sent', models.DateTimeField(blank=True, null=True)),
('outage_history', django.contrib.postgres.fields.jsonb.JSONField(blank=True, null=True)),
('extra_details', django.contrib.postgres.fields.jsonb.JSONField(blank=True, null=True)),
('threshold', models.PositiveIntegerField(blank=True, null=True, validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(99)])),
('disk', models.CharField(blank=True, max_length=2, null=True)),
('ip', models.CharField(blank=True, max_length=255, null=True)),
('timeout', models.PositiveIntegerField(blank=True, null=True)),
('stdout', models.TextField(blank=True, null=True)),
('stderr', models.TextField(blank=True, null=True)),
('retcode', models.IntegerField(blank=True, null=True)),
('execution_time', models.CharField(blank=True, max_length=100, null=True)),
('history', django.contrib.postgres.fields.ArrayField(base_field=models.IntegerField(blank=True), blank=True, default=list, null=True, size=None)),
('svc_name', models.CharField(blank=True, max_length=255, null=True)),
('svc_display_name', models.CharField(blank=True, max_length=255, null=True)),
('pass_if_start_pending', models.BooleanField(blank=True, null=True)),
('restart_if_stopped', models.BooleanField(blank=True, null=True)),
('svc_policy_mode', models.CharField(blank=True, max_length=20, null=True)),
('log_name', models.CharField(blank=True, choices=[('Application', 'Application'), ('System', 'System'), ('Security', 'Security')], max_length=255, null=True)),
('event_id', models.IntegerField(blank=True, null=True)),
('event_type', models.CharField(blank=True, choices=[('INFO', 'Information'), ('WARNING', 'Warning'), ('ERROR', 'Error'), ('AUDIT_SUCCESS', 'Success Audit'), ('AUDIT_FAILURE', 'Failure Audit')], max_length=255, null=True)),
('fail_when', models.CharField(blank=True, choices=[('contains', 'Log contains'), ('not_contains', 'Log does not contain')], max_length=255, null=True)),
('search_last_days', models.PositiveIntegerField(blank=True, null=True)),
('agent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='agentchecks', to='agents.Agent')),
('policy', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='policychecks', to='automation.Policy')),
('script', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='script', to='scripts.Script')),
],
),
]

View File

@ -0,0 +1,30 @@
# Generated by Django 3.0.6 on 2020-05-31 01:23
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Client',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('client', models.CharField(max_length=255)),
],
),
migrations.CreateModel(
name='Site',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('site', models.CharField(max_length=255)),
('client', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='sites', to='clients.Client')),
],
),
]

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,29 @@
# Generated by Django 3.0.6 on 2020-05-31 01:23
import django.contrib.postgres.fields.jsonb
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('agents', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='PendingAction',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('entry_time', models.DateTimeField(auto_now_add=True)),
('action_type', models.CharField(blank=True, choices=[('schedreboot', 'Scheduled Reboot')], max_length=255, null=True)),
('status', models.CharField(choices=[('pending', 'Pending'), ('completed', 'Completed')], default='pending', max_length=255)),
('celery_id', models.CharField(blank=True, max_length=255, null=True)),
('details', django.contrib.postgres.fields.jsonb.JSONField(blank=True, null=True)),
('agent', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='pendingactions', to='agents.Agent')),
],
),
]

View File

@ -0,0 +1,24 @@
# Generated by Django 3.0.6 on 2020-05-31 01:23
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Script',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=255)),
('description', models.TextField(blank=True, null=True)),
('filename', models.CharField(max_length=255)),
('shell', models.CharField(choices=[('powershell', 'Powershell'), ('cmd', 'Batch (CMD)'), ('python', 'Python')], default='powershell', max_length=100)),
],
),
]

View File

@ -0,0 +1,45 @@
# Generated by Django 3.0.6 on 2020-05-31 01:23
import django.contrib.postgres.fields.jsonb
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('agents', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='ChocoSoftware',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('chocos', django.contrib.postgres.fields.jsonb.JSONField()),
('added', models.DateTimeField(auto_now_add=True)),
],
),
migrations.CreateModel(
name='InstalledSoftware',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('software', django.contrib.postgres.fields.jsonb.JSONField()),
('agent', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='agents.Agent')),
],
),
migrations.CreateModel(
name='ChocoLog',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=255)),
('version', models.CharField(max_length=255)),
('message', models.TextField()),
('installed', models.BooleanField(default=False)),
('time', models.DateTimeField(auto_now_add=True)),
('agent', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='chocolog', to='agents.Agent')),
],
),
]

View File

@ -0,0 +1,54 @@
# Generated by Django 3.0.6 on 2020-05-31 01:23
import django.contrib.postgres.fields
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('agents', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='WinUpdatePolicy',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('critical', models.CharField(choices=[('manual', 'Manual'), ('approve', 'Approve'), ('ignore', 'Ignore')], default='manual', max_length=100)),
('important', models.CharField(choices=[('manual', 'Manual'), ('approve', 'Approve'), ('ignore', 'Ignore')], default='manual', max_length=100)),
('moderate', models.CharField(choices=[('manual', 'Manual'), ('approve', 'Approve'), ('ignore', 'Ignore')], default='manual', max_length=100)),
('low', models.CharField(choices=[('manual', 'Manual'), ('approve', 'Approve'), ('ignore', 'Ignore')], default='manual', max_length=100)),
('other', models.CharField(choices=[('manual', 'Manual'), ('approve', 'Approve'), ('ignore', 'Ignore')], default='manual', max_length=100)),
('run_time_hour', models.IntegerField(choices=[(0, '12 AM'), (1, '01 AM'), (2, '02 AM'), (3, '03 AM'), (4, '04 AM'), (5, '05 AM'), (6, '06 AM'), (7, '07 AM'), (8, '08 AM'), (9, '09 AM'), (10, '10 AM'), (11, '11 AM'), (12, '12 PM'), (13, '01 PM'), (14, '02 PM'), (15, '03 PM'), (16, '04 PM'), (17, '05 PM'), (18, '06 PM'), (19, '07 PM'), (20, '08 PM'), (21, '09 PM'), (22, '10 PM'), (23, '11 PM')], default=3)),
('run_time_days', django.contrib.postgres.fields.ArrayField(base_field=models.IntegerField(blank=True), blank=True, default=list, null=True, size=None)),
('reboot_after_install', models.CharField(choices=[('never', 'Never'), ('required', 'When Required'), ('always', 'Always')], default='required', max_length=50)),
('reprocess_failed', models.BooleanField(default=False)),
('reprocess_failed_times', models.PositiveIntegerField(default=5)),
('email_if_fail', models.BooleanField(default=False)),
('agent', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='winupdatepolicy', to='agents.Agent')),
],
),
migrations.CreateModel(
name='WinUpdate',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('guid', models.CharField(max_length=255, null=True)),
('kb', models.CharField(max_length=100, null=True)),
('mandatory', models.BooleanField(default=False)),
('title', models.TextField(null=True)),
('needs_reboot', models.BooleanField(default=False)),
('installed', models.BooleanField(default=False)),
('downloaded', models.BooleanField(default=False)),
('description', models.TextField(null=True)),
('severity', models.CharField(blank=True, max_length=255, null=True)),
('action', models.CharField(choices=[('inherit', 'Inherit'), ('approve', 'Approve'), ('ignore', 'Ignore'), ('nothing', 'Do Nothing')], default='nothing', max_length=100)),
('result', models.CharField(default='n/a', max_length=255)),
('date_installed', models.DateTimeField(null=True)),
('agent', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='winupdates', to='agents.Agent')),
],
),
]