# -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2020-11-02 09:26
from __future__ import unicode_literals
from os import environ
from django.db import migrations

def create_default_elastic_host(apps, schema_editor):
    Elastic = apps.get_model("elastic", "ElasticSearchSettings")
    default_elastic_host = Elastic(
        host=environ.get("ELASTICSEARCH_URL", "")
    )
    default_elastic_host.save()

class Migration(migrations.Migration):

    dependencies = [
        ('elastic', '0001_initial'),
    ]

    operations = [
        migrations.RunPython(create_default_elastic_host),
    ]
