# Generated by Django 3.1.7 on 2021-04-03 15:35

from django.db import migrations, models
import json.decoder
import json.encoder


class Migration(migrations.Migration):

    dependencies = [
        ('app', '0003_auto_20210330_1823'),
    ]

    operations = [
        migrations.AlterModelOptions(
            name='metric',
            options={'ordering': ['key']},
        ),
        migrations.AlterModelOptions(
            name='package',
            options={'ordering': ['package_url']},
        ),
        migrations.RenameField(
            model_name='metric',
            old_name='value_text',
            new_name='value',
        ),
        migrations.RemoveField(
            model_name='metric',
            name='timestamp',
        ),
        migrations.RemoveField(
            model_name='metric',
            name='value_integer',
        ),
        migrations.AddField(
            model_name='metric',
            name='last_updated',
            field=models.DateTimeField(auto_now=True, null=True),
        ),
        migrations.AlterField(
            model_name='metric',
            name='key',
            field=models.CharField(max_length=256),
        ),
        migrations.AlterField(
            model_name='metric',
            name='properties',
            field=models.JSONField(blank=True, decoder=json.decoder.JSONDecoder, encoder=json.encoder.JSONEncoder, null=True),
        ),
        migrations.AlterField(
            model_name='package',
            name='last_updated',
            field=models.DateTimeField(auto_now=True),
        ),
        migrations.AddIndex(
            model_name='metric',
            index=models.Index(fields=['package', 'key'], name='metric_package_cd39db_idx'),
        ),
        migrations.AlterModelTable(
            name='metric',
            table='metric',
        ),
        migrations.AlterModelTable(
            name='package',
            table='package',
        ),
    ]
