# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-06-02 15:59
from __future__ import unicode_literals

from django.db import migrations


def load_sports(apps, schema_editor):
    db = schema_editor.connection.alias
    Sport = apps.get_model("multidb_account", "Sport")
    soccer = Sport(id=1, name='soccer', description='Soccer', is_available=True)
    soccer.save(using=db)
    basketball = Sport(id=2, name='basketball', description='Basketball', is_available=True)
    basketball.save(using=db)
    baseball = Sport(id=3, name='baseball', description='Baseball', is_available=True)
    baseball.save(using=db)
    hockey = Sport(id=4, name='hockey', description='Hockey', is_available=True)
    hockey.save(using=db)
    rugby = Sport(id=5, name='rugby', description='Rugby', is_available=True)
    rugby.save(using=db)
    tennis = Sport(id=6, name='tennis', description='Tennis', is_available=True)
    tennis.save(using=db)
    field_hockey = Sport(id=7, name='field hockey', description='Field Hockey', is_available=True)
    field_hockey.save(using=db)
    volleyball = Sport(id=8, name='volleyball', description='Volleyball', is_available=True)
    volleyball.save(using=db)


def reverse_func(apps, schema_editor):
    del apps, schema_editor


class Migration(migrations.Migration):
    dependencies = [
        ('multidb_account', '0001_initial'),
    ]

    operations = [
        migrations.RunPython(load_sports, reverse_func),
    ]
