text: # -*- coding: utf-8 -*-
  # Generated by Django 1.11.1 on 2017-05-22 11:43
  from __future__ import unicode_literals
  
  from django.db import migrations
  
  
  def create_accounts(apps, schema_editor):
      """Create Accounts for all users."""
      User = apps.get_model('auth', 'User')
      Account = apps.get_model('users', 'Account')
      for user in User.objects.filter(account__isnull=True):
          Account.objects.create(user=user)
  
  
  def delete_accounts(apps, schema_editor):
      """Delete Accounts for all users."""
      Account = apps.get_model('users', 'Account')
      Account.objects.all().delete()
  
  
  class Migration(migrations.Migration):
  
      dependencies = [
          ('users', '0008_auto_20170522_1135'),
      ]
  
      operations = [
          migrations.RunPython(create_accounts, reverse_code=delete_accounts),
      ]
  