# -*- coding: utf-8 -*-
# Generated by Django 1.10.6 on 2017-08-11 08:43
from __future__ import unicode_literals

from django.db import migrations
from django.conf import settings


def update_all_contenttypes(**kwargs):
    from django.apps import apps
    from django.contrib.contenttypes.management import update_contenttypes

    for app_config in apps.get_app_configs():
        update_contenttypes(app_config, **kwargs)


def create_all_permissions(**kwargs):
    from django.contrib.auth.management import create_permissions
    from django.apps import apps

    for app_config in apps.get_app_configs():
        create_permissions(app_config, **kwargs)


def forward(apps, schema_editor):
    update_all_contenttypes()
    create_all_permissions()


def backward(apps, schema_editor):
    pass


class Migration(migrations.Migration):
    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('contenttypes', '0002_remove_content_type_name'),
        ('users', '0007_passwordhistory_last_login'),
        ('patients', '0033_auto_20170823_0623'),
    ]

    operations = [
        migrations.RunPython(forward, backward)
    ]
