# -*- coding: utf-8 -*-
# Generated by Django 1.11.19 on 2019-02-11 12:18
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='SFTPUserAccount',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('last_login', models.DateTimeField(editable=False, null=True, verbose_name='Last login')),
                ('home_dir', models.CharField(blank=True, max_length=1024, null=True, verbose_name='Home directory')),
            ],
            options={
                'verbose_name': 'SFTP user account',
                'verbose_name_plural': 'SFTP user accounts',
            },
        ),
        migrations.CreateModel(
            name='SFTPUserGroup',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=30, unique=True, verbose_name='Group name')),
                ('home_dir', models.CharField(blank=True, max_length=1024, null=True, verbose_name='Home directory')),
            ],
            options={
                'verbose_name': 'SFTP user group',
                'verbose_name_plural': 'SFTP user groups',
            },
        ),
        migrations.AddField(
            model_name='sftpuseraccount',
            name='group',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='django_sftp.SFTPUserGroup', verbose_name='SFTP user group'),
        ),
        migrations.AddField(
            model_name='sftpuseraccount',
            name='user',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='User'),
        ),
    ]
