bloombase/plants/migrations/0006_species_vpc_raw.py
Stephan Kerkman 7fef359ae0 feat: store VPC raw scrape data and add reset button
Species.vpc_raw (JSONField) stores the full scrape payload at import time.
vpc_species_reset view restores bloom_months, sunlight, max_height_cm etc.
from that snapshot. If vpc_raw is missing (species imported before this
feature), it re-scrapes from VPC on demand and saves the result.
Reset button appears on plant detail page for any plant with a VPC species.
A 'next' hidden field returns the user to the same plant after reset.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 18:49:15 +02:00

16 lines
342 B
Python

from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('plants', '0005_species_vpc_slug'),
]
operations = [
migrations.AddField(
model_name='species',
name='vpc_raw',
field=models.JSONField(blank=True, null=True),
),
]