text: # Generated by Django 2.0 on 2017-12-20 15:32
  
  from django.db import migrations, models
  import django.db.models.deletion
  
  
  class Migration(migrations.Migration):
  
      dependencies = [
          ('portfolio', '0003_add_transaction_model'),
      ]
  
      operations = [
          migrations.CreateModel(
              name='Asset',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('cusip', models.CharField(max_length=9)),
                  ('isin', models.CharField(max_length=12)),
                  ('issuer', models.CharField(max_length=50)),
                  ('name', models.CharField(max_length=200)),
                  ('valor', models.PositiveIntegerField(blank=True)),
                  ('wkn', models.CharField(blank=True, max_length=6)),
              ],
          ),
          migrations.RemoveField(
              model_name='investment',
              name='stock',
          ),
          migrations.RemoveField(
              model_name='shareprice',
              name='stock',
          ),
          migrations.RemoveField(
              model_name='stock',
              name='id',
          ),
          migrations.RemoveField(
              model_name='stock',
              name='isin',
          ),
          migrations.RemoveField(
              model_name='stock',
              name='name',
          ),
          migrations.RemoveField(
              model_name='stock',
              name='wkn',
          ),
          migrations.AddField(
              model_name='stock',
              name='sector',
              field=models.CharField(default='Misc', max_length=200),
              preserve_default=False,
          ),
          migrations.CreateModel(
              name='Bond',
              fields=[
                  ('asset_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='portfolio.Asset')),
              ],
              bases=('portfolio.asset',),
          ),
          migrations.CreateModel(
              name='Fund',
              fields=[
                  ('asset_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='portfolio.Asset')),
                  ('ter', models.DecimalField(decimal_places=2, max_digits=3)),
              ],
              bases=('portfolio.asset',),
          ),
          migrations.AddField(
              model_name='investment',
              name='asset',
              field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.PROTECT, to='portfolio.Asset'),
              preserve_default=False,
          ),
          migrations.AddField(
              model_name='shareprice',
              name='asset',
              field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='portfolio.Asset'),
              preserve_default=False,
          ),
          migrations.AddField(
              model_name='stock',
              name='asset_ptr',
              field=models.OneToOneField(auto_created=True, default=1, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='portfolio.Asset'),
              preserve_default=False,
          ),
          migrations.AddField(
              model_name='bond',
              name='funds',
              field=models.ManyToManyField(to='portfolio.Fund'),
          ),
          migrations.AddField(
              model_name='stock',
              name='funds',
              field=models.ManyToManyField(to='portfolio.Fund'),
          ),
      ]
  