text: # -*- coding: utf-8 -*-
  # Generated by Django 1.10.4 on 2017-05-05 11:14
  from __future__ import unicode_literals
  
  from django.db import migrations
  
  
  def elevatorlevel_to_area(apps, schema_editor):
      Area = apps.get_model('mapdata', 'Area')
  
      ElevatorLevel = apps.get_model('mapdata', 'ElevatorLevel')
      for obj in ElevatorLevel.objects.all():
          Area.objects.create(
              name=obj.name,
              geometry=obj.geometry,
              level=obj.level,
              public=obj.public,
              category='elevator',
              layer='',
          )
  
  
  class Migration(migrations.Migration):
  
      dependencies = [
          ('mapdata', '0047_auto_20170505_1002'),
      ]
  
      operations = [
          migrations.RunPython(elevatorlevel_to_area),
      ]
  