From 115c7c4d5023361cdbda7bedd06c10d149f34a85 Mon Sep 17 00:00:00 2001 From: fit2cloud-fengyi Date: Tue, 6 Mar 2018 18:52:09 +0800 Subject: [PATCH] add ignore --- apps/ops/migrations/0001_initial.py | 84 +++++++++++++++++++++++++++++ apps/ops/migrations/__init__.py | 0 2 files changed, 84 insertions(+) create mode 100644 apps/ops/migrations/0001_initial.py create mode 100644 apps/ops/migrations/__init__.py diff --git a/apps/ops/migrations/0001_initial.py b/apps/ops/migrations/0001_initial.py new file mode 100644 index 000000000..13adf43a8 --- /dev/null +++ b/apps/ops/migrations/0001_initial.py @@ -0,0 +1,84 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2017-12-24 15:21 +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion +import uuid + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='AdHoc', + fields=[ + ('id', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False)), + ('_tasks', models.TextField(verbose_name='Tasks')), + ('pattern', models.CharField(default='{}', max_length=64, verbose_name='Pattern')), + ('_options', models.CharField(default='', max_length=1024, verbose_name='Options')), + ('_hosts', models.TextField(blank=True, verbose_name='Hosts')), + ('run_as_admin', models.BooleanField(default=False, verbose_name='Run as admin')), + ('run_as', models.CharField(default='', max_length=128, verbose_name='Run as')), + ('_become', models.CharField(default='', max_length=1024, verbose_name='Become')), + ('created_by', models.CharField(default='', max_length=64, null=True, verbose_name='Create by')), + ('date_created', models.DateTimeField(auto_now_add=True)), + ], + options={ + 'db_table': 'ops_adhoc', + 'get_latest_by': 'date_created', + }, + ), + migrations.CreateModel( + name='AdHocRunHistory', + fields=[ + ('id', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False)), + ('date_start', models.DateTimeField(auto_now_add=True, verbose_name='Start time')), + ('date_finished', models.DateTimeField(blank=True, null=True, verbose_name='End time')), + ('timedelta', models.FloatField(default=0.0, null=True, verbose_name='Time')), + ('is_finished', models.BooleanField(default=False, verbose_name='Is finished')), + ('is_success', models.BooleanField(default=False, verbose_name='Is success')), + ('_result', models.TextField(blank=True, null=True, verbose_name='Adhoc raw result')), + ('_summary', models.TextField(blank=True, null=True, verbose_name='Adhoc result summary')), + ('adhoc', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='history', to='ops.AdHoc')), + ], + options={ + 'db_table': 'ops_adhoc_history', + 'get_latest_by': 'date_start', + }, + ), + migrations.CreateModel( + name='Task', + fields=[ + ('id', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False)), + ('name', models.CharField(max_length=128, unique=True, verbose_name='Name')), + ('interval', models.IntegerField(blank=True, help_text='Units: seconds', null=True, verbose_name='Interval')), + ('crontab', models.CharField(blank=True, help_text='5 * * * *', max_length=128, null=True, verbose_name='Crontab')), + ('is_periodic', models.BooleanField(default=False)), + ('callback', models.CharField(blank=True, max_length=128, null=True, verbose_name='Callback')), + ('is_deleted', models.BooleanField(default=False)), + ('comment', models.TextField(blank=True, verbose_name='Comment')), + ('created_by', models.CharField(blank=True, default='', max_length=128, null=True)), + ('date_created', models.DateTimeField(auto_now_add=True)), + ], + options={ + 'db_table': 'ops_task', + 'get_latest_by': 'date_created', + }, + ), + migrations.AddField( + model_name='adhocrunhistory', + name='task', + field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='history', to='ops.Task'), + ), + migrations.AddField( + model_name='adhoc', + name='task', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='adhoc', to='ops.Task'), + ), + ] diff --git a/apps/ops/migrations/__init__.py b/apps/ops/migrations/__init__.py new file mode 100644 index 000000000..e69de29bb