# -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2017-10-25 11:25
from __future__ import unicode_literals

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import project_name.apps.core.utils.fields


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('core', '0002_auto_20171025_1125'),
        ('module', '0001_initial'),
    ]

    operations = [
        migrations.AddField(
            model_name='rolemoduleitem',
            name='created_by',
            field=project_name.apps.core.utils.fields.CurrentUserField(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='module_rolemoduleitem_created_by', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='rolemoduleitem',
            name='modified_by',
            field=project_name.apps.core.utils.fields.CurrentUserField(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='module_rolemoduleitem_modified_by', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='rolemoduleitem',
            name='moduleitem',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='module.ModuleItem'),
        ),
        migrations.AddField(
            model_name='rolemoduleitem',
            name='permission',
            field=models.ManyToManyField(blank=True, to='core.Permission'),
        ),
        migrations.AddField(
            model_name='rolemoduleitem',
            name='role_module',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='module.RoleModule'),
        ),
        migrations.AddField(
            model_name='rolemodule',
            name='created_by',
            field=project_name.apps.core.utils.fields.CurrentUserField(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='module_rolemodule_created_by', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='rolemodule',
            name='modified_by',
            field=project_name.apps.core.utils.fields.CurrentUserField(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='module_rolemodule_modified_by', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='rolemodule',
            name='module',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='module.Module'),
        ),
        migrations.AddField(
            model_name='rolemodule',
            name='role',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='core.Role'),
        ),
        migrations.AddField(
            model_name='moduleitem',
            name='created_by',
            field=project_name.apps.core.utils.fields.CurrentUserField(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='module_moduleitem_created_by', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='moduleitem',
            name='modified_by',
            field=project_name.apps.core.utils.fields.CurrentUserField(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='module_moduleitem_modified_by', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='moduleitem',
            name='module',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='module.Module'),
        ),
        migrations.AddField(
            model_name='module',
            name='created_by',
            field=project_name.apps.core.utils.fields.CurrentUserField(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='module_module_created_by', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='module',
            name='modified_by',
            field=project_name.apps.core.utils.fields.CurrentUserField(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='module_module_modified_by', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterUniqueTogether(
            name='rolemoduleitem',
            unique_together=set([('role_module', 'moduleitem')]),
        ),
        migrations.AlterUniqueTogether(
            name='rolemodule',
            unique_together=set([('module',)]),
        ),
        migrations.AlterUniqueTogether(
            name='module',
            unique_together=set([('name',)]),
        ),
    ]
