# -*- coding: utf-8 -*-
# Generated by Django 1.11.14 on 2018-09-04 08:14
from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [
        ('CMDB', '0011_auto_20180904_1607'),
    ]

    operations = [
        migrations.CreateModel(
            name='Cron_Config',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('cron_minute', models.CharField(default=None, max_length=10, verbose_name='\u5206')),
                ('cron_hour', models.CharField(default=None, max_length=10, verbose_name='\u65f6')),
                ('cron_day', models.CharField(default=None, max_length=10, verbose_name='\u5929')),
                ('cron_week', models.CharField(default=None, max_length=10, verbose_name='\u5468')),
                ('cron_month', models.CharField(default=None, max_length=10, verbose_name='\u6708')),
                ('cron_user', models.CharField(default=None, max_length=50, verbose_name='\u4efb\u52a1\u7528\u6237')),
                ('cron_name', models.CharField(default=None, max_length=100, verbose_name='\u4efb\u52a1\u540d\u79f0')),
                ('cron_desc', models.CharField(blank=True, default=None, max_length=200, null=True, verbose_name='\u4efb\u52a1\u63cf\u8ff0')),
                ('cron_command', models.CharField(default=None, max_length=200, verbose_name='\u4efb\u52a1\u53c2\u6570')),
                ('cron_script', models.FileField(blank=True, default=None, null=True, upload_to='./cron/', verbose_name='\u811a\u672c\u8def\u5f84')),
                ('cron_script_path', models.CharField(blank=True, default=None, max_length=100, null=True, verbose_name='\u811a\u672c\u8def\u5f84')),
                ('cron_status', models.SmallIntegerField(default=None, verbose_name='\u4efb\u52a1\u72b6\u6001')),
                ('cron_server', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='CMDB.Server_Assets')),
            ],
            options={
                'verbose_name_plural': '\u4efb\u52a1\u914d\u7f6e\u8868',
                'db_table': 'opsmanage_cron_config',
                'verbose_name': '\u4efb\u52a1\u914d\u7f6e\u8868',
                'permissions': (('can_read_cron_config', '\u8bfb\u53d6\u4efb\u52a1\u914d\u7f6e\u6743\u9650'), ('can_change_cron_config', '\u66f4\u6539\u4efb\u52a1\u914d\u7f6e\u6743\u9650'), ('can_add_cron_config', '\u6dfb\u52a0\u4efb\u52a1\u914d\u7f6e\u6743\u9650'), ('can_delete_cron_config', '\u5220\u9664\u4efb\u52a1\u914d\u7f6e\u6743\u9650')),
            },
        ),
        migrations.CreateModel(
            name='Log_Cron_Config',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('cron_id', models.IntegerField(blank=True, default=None, null=True, verbose_name='id')),
                ('cron_user', models.CharField(default=None, max_length=50, verbose_name='\u64cd\u4f5c\u7528\u6237')),
                ('cron_name', models.CharField(default=None, max_length=100, verbose_name='\u540d\u79f0')),
                ('cron_content', models.CharField(default=None, max_length=100)),
                ('cron_server', models.CharField(default=None, max_length=100)),
                ('create_time', models.DateTimeField(auto_now_add=True, null=True, verbose_name='\u6267\u884c\u65f6\u95f4')),
            ],
            options={
                'db_table': 'opsmanage_log_cron_config',
                'verbose_name': '\u4efb\u52a1\u914d\u7f6e\u64cd\u4f5c\u8bb0\u5f55\u8868',
                'verbose_name_plural': '\u4efb\u52a1\u914d\u7f6e\u64cd\u4f5c\u8bb0\u5f55\u8868',
            },
        ),
        migrations.AlterUniqueTogether(
            name='cron_config',
            unique_together=set([('cron_name', 'cron_server', 'cron_user')]),
        ),
    ]
