Skip to content

Update importer: stop writing image_url, insert only images #296

@zigzagdev

Description

@zigzagdev

Tasks

  • Locate the importer code path that currently handles images (Command/Service)
  • Remove/disable writes to main-table fields (e.g. world_heritage_sites.image_url / primary_image_url)
  • Implement insert/upsert into world_heritage_site_images
    • Always set world_heritage_site_id
    • Always set url
    • Compute url_hash consistently (e.g. hash('sha256', $url))
    • Assign sort_order sequentially (0..N)
    • Set is_primary = true only for the first item
  • Define empty behaviour
    • If no images exist in payload, insert nothing
  • Add basic logging/console output for debugging
    • inserted count
    • skipped count (duplicates, invalid URLs, etc.)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions