<commit_before># -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-06-14 12:28
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Account',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=128)),
                ('description', models.CharField(max_length=128)),
            ],
        ),
        migrations.CreateModel(
            name='AssetClass',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=128)),
                ('type', models.CharField(choices=[('STK', 'Stocks'), ('BND', 'Bonds'), ('CSH', 'Cash Equivalents'), ('ALT', 'Alternatives')], default='STK', max_length=3)),
            ],
        ),
        migrations.CreateModel(
            name='Investor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=80)),
                ('username', models.CharField(max_length=30)),
                ('email', models.EmailField(blank=True, max_length=254)),
            ],
        ),
        migrations.CreateModel(
            name='Portfolio',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=128)),
                ('objective', models.CharField(max_length=128)),
                ('risk_tolerance', models.TextField()),
                ('time_frame', models.PositiveSmallIntegerField()),
                ('stock_bond_ratio', models.DecimalField(decimal_places=2, max_digits=4)),
                ('asset_allocation', jsonfield.fields.JSONField(default=dict)),
                ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myportfolio.Investor')),
            ],
        ),
        migrations.CreateModel(
            name='Security',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=128)),
                ('symbol', models.CharField(max_length=16)),
                ('isin', models.CharField(max_length=16)),
                ('currency', models.CharField(max_length=3)),
                ('exchange', models.CharField(max_length=64)),
                ('expense_ratio_percent', models.DecimalField(decimal_places=2, max_digits=4)),
                ('last_trade_price', models.DecimalField(decimal_places=4, max_digits=11)),
                ('asset_class', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myportfolio.AssetClass')),
            ],
        ),
        migrations.CreateModel(
            name='Transaction',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateField()),
                ('price', models.DecimalField(decimal_places=4, max_digits=11)),
                ('quantity', models.DecimalField(decimal_places=4, max_digits=11)),
                ('account', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myportfolio.Account')),
                ('portfolio', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myportfolio.Portfolio')),
                ('security', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myportfolio.Security')),
            ],
        ),
        migrations.AddField(
            model_name='assetclass',
            name='owner',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myportfolio.Investor'),
        ),
        migrations.AddField(
            model_name='account',
            name='owner',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myportfolio.Investor'),
        ),
    ]
<commit_msg>update db migration script after changing field names in Portfolio<commit_after># -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-06-25 09:59
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Account',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=128)),
                ('description', models.CharField(max_length=128)),
            ],
        ),
        migrations.CreateModel(
            name='AssetClass',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=128)),
                ('type', models.CharField(choices=[('STK', 'Stocks'), ('BND', 'Bonds'), ('CSH', 'Cash Equivalents'), ('ALT', 'Alternatives')], default='STK', max_length=3)),
            ],
        ),
        migrations.CreateModel(
            name='Investor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=80)),
                ('username', models.CharField(max_length=30)),
                ('email', models.EmailField(blank=True, max_length=254)),
            ],
        ),
        migrations.CreateModel(
            name='Portfolio',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=128)),
                ('objective', models.CharField(max_length=128)),
                ('risk_tolerance', models.TextField()),
                ('time_frame', models.PositiveSmallIntegerField()),
                ('target_stock_bond_ratio', models.DecimalField(decimal_places=2, max_digits=4)),
                ('target_asset_allocation', jsonfield.fields.JSONField(default=dict)),
                ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myportfolio.Investor')),
            ],
        ),
        migrations.CreateModel(
            name='Security',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=128)),
                ('symbol', models.CharField(max_length=16)),
                ('isin', models.CharField(max_length=16)),
                ('currency', models.CharField(max_length=3)),
                ('exchange', models.CharField(max_length=64)),
                ('expense_ratio_percent', models.DecimalField(decimal_places=2, max_digits=4)),
                ('last_trade_price', models.DecimalField(decimal_places=4, max_digits=11)),
                ('asset_class', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myportfolio.AssetClass')),
            ],
        ),
        migrations.CreateModel(
            name='Transaction',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateField()),
                ('price', models.DecimalField(decimal_places=4, max_digits=11)),
                ('quantity', models.DecimalField(decimal_places=4, max_digits=11)),
                ('account', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myportfolio.Account')),
                ('portfolio', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myportfolio.Portfolio')),
                ('security', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myportfolio.Security')),
            ],
        ),
        migrations.AddField(
            model_name='assetclass',
            name='owner',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myportfolio.Investor'),
        ),
        migrations.AddField(
            model_name='account',
            name='owner',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myportfolio.Investor'),
        ),
    ]

{'fraction_non_alphanumeric': 0.1448687619691337, 'fraction_numerical': 0.013968683113664527, 'mean_word_length': 2.4843014128728416, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '960465', 'n_tokens_mistral': 2671, 'n_tokens_neox': 2480, 'n_words': 337}