# encoding: utf8
from __future__ import unicode_literals

from django.db import models, migrations

def initial_data(apps, schema_editor):
    Symbol = apps.get_model('portfolio', 'Symbol')
    return

class Migration(migrations.Migration):

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Symbol',
            fields=[
                (
                    'id',
                    models.AutoField(
                        verbose_name='ID',
                        serialize=False,
                        auto_created=True,
                        primary_key=True)
                ),
                ('name', models.CharField(max_length=32)),
                ('slug', models.SlugField(default="")),
            ],
            options={
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='Quote',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('symbol', models.ForeignKey(to='portfolio.Symbol', to_field='id')),
                ('date', models.DateField()),
                ('adj_close', models.DecimalField(max_digits=32, decimal_places=30)),
                ('closed', models.DecimalField(max_digits=32, decimal_places=30)),
                ('high', models.DecimalField(max_digits=32, decimal_places=30)),
                ('low', models.DecimalField(max_digits=32, decimal_places=30)),
                ('opened', models.DecimalField(max_digits=32, decimal_places=30)),
                ('volume', models.DecimalField(max_digits=32, decimal_places=30)),
            ],
            options={
                'unique_together': set([(b'symbol', b'date')]),
            },
            bases=(models.Model,),
        ),
        migrations.RunPython(initial_data),
    ]
