# Generated by Django 2.0.6 on 2018-06-27 12:47

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [
        ('security', '0005_auto_20180624_1307'),
    ]

    operations = [
        migrations.CreateModel(
            name='SecurityMargin',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateField(db_index=True, null=True, verbose_name='日付')),
                ('jsf_margin_type', models.CharField(max_length=4, verbose_name='速報/確報')),
                ('jsf_buy_new', models.BigIntegerField(null=True, verbose_name='融資新規')),
                ('jsf_buy_refund', models.BigIntegerField(null=True, verbose_name='融資返済')),
                ('jsf_buy_balance', models.BigIntegerField(null=True, verbose_name='融資残高')),
                ('jsf_sell_new', models.BigIntegerField(null=True, verbose_name='貸株新規')),
                ('jsf_sell_refund', models.BigIntegerField(null=True, verbose_name='貸株返済')),
                ('jsf_sell_balance', models.BigIntegerField(null=True, verbose_name='貸株残高')),
                ('jsf_net_balance', models.BigIntegerField(null=True, verbose_name='差引残高')),
                ('jsf_net_change', models.BigIntegerField(null=True, verbose_name='差引前日比')),
                ('jsf_max_backwardation', models.FloatField(null=True, verbose_name='最高料率')),
                ('jsf_backwardation', models.FloatField(null=True, verbose_name='品貸料率')),
                ('jsf_backwardation_ratio', models.FloatField(null=True, verbose_name='品貸料率(%)')),
                ('jsf_backwardation_days', models.FloatField(null=True, verbose_name='品貸日数')),
                ('jsf_limitation', models.CharField(max_length=4, null=True, verbose_name='規制')),
                ('tse_buy_balance', models.BigIntegerField(null=True, verbose_name='信用買残高')),
                ('tse_buy_change', models.BigIntegerField(null=True, verbose_name='信用買残高(前週比)')),
                ('tse_sell_balance', models.BigIntegerField(null=True, verbose_name='信用売残高')),
                ('tse_sell_change', models.BigIntegerField(null=True, verbose_name='信用売残高(前週比)')),
            ],
        ),
        migrations.CreateModel(
            name='SecurityPrice',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateField(db_index=True, null=True, verbose_name='日付')),
                ('opening_price', models.FloatField(null=True, verbose_name='始値')),
                ('max_price', models.FloatField(null=True, verbose_name='高値')),
                ('min_price', models.FloatField(null=True, verbose_name='安値')),
                ('closing_price', models.FloatField(null=True, verbose_name='終値')),
                ('change', models.FloatField(null=True, verbose_name='前日比')),
                ('change_ratio', models.FloatField(null=True, verbose_name='前日比(%)')),
                ('vwap', models.FloatField(verbose_name='VWAP')),
                ('trading_volume', models.BigIntegerField(null=True, verbose_name='出来高')),
                ('trading_volume_ratio', models.FloatField(verbose_name='出来高率')),
                ('trading_value', models.FloatField(verbose_name='売買代金(千円)')),
                ('annual_max_price', models.FloatField(verbose_name='年初来高値')),
                ('annual_max_price_deviation_ratio', models.FloatField(verbose_name='年初来高値乖離率')),
                ('annual_min_price', models.FloatField(verbose_name='年初来安値')),
                ('annual_min_price_deviation_ratio', models.FloatField(verbose_name='年初来安値乖離率')),
            ],
        ),
        migrations.AddField(
            model_name='securitycode',
            name='delisted_date',
            field=models.DateField(null=True, verbose_name='上場廃止日'),
        ),
        migrations.AddField(
            model_name='securitycode',
            name='listed_date',
            field=models.DateField(null=True, verbose_name='上場日'),
        ),
        migrations.AlterField(
            model_name='security',
            name='market_value',
            field=models.BigIntegerField(verbose_name='時価総額(百万円)'),
        ),
        migrations.AlterField(
            model_name='security',
            name='shares_number',
            field=models.BigIntegerField(verbose_name='発行済株式数'),
        ),
        migrations.AlterField(
            model_name='securitycode',
            name='code',
            field=models.CharField(max_length=4, unique=True, verbose_name='証券コード'),
        ),
        migrations.AlterField(
            model_name='securitycode',
            name='edinet_code',
            field=models.CharField(max_length=6, verbose_name='EDINETコード'),
        ),
        migrations.AlterField(
            model_name='securitycode',
            name='isin_code',
            field=models.CharField(max_length=12, verbose_name='ISINコード'),
        ),
        migrations.AddField(
            model_name='securityprice',
            name='security_code',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='security.SecurityCode'),
        ),
        migrations.AddField(
            model_name='securitymargin',
            name='security_code',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='security.SecurityCode'),
        ),
    ]
