v5-migration

Migrate v4 category-based tags to v5 PhotoTags in batched, idempotent runs.

132|42|Updated Aug 19, 2020
One-click install
npx skills add https://github.com/OpenLitterMap/openlittermap-web --skill v5-migration
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: v5-migration
Source: https://github.com/OpenLitterMap/openlittermap-web/tree/main/.ai/skills/v5-migration
Command: npx skills add https://github.com/OpenLitterMap/openlittermap-web --skill v5-migration

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Migrates v4 category-based tag data to v5 normalized PhotoTags, processing data per user in safe, batched runs with idempotency via migrated_at.

Core Features & Use Cases

  • Per-user batched migration with a default batch size to avoid memory spikes and long-running transactions.
  • Rebuilds v5 tag structures and generates summaries for downstream metrics.
  • Resilient: logs errors and continues, allowing retries without duplicates due to migrated_at guards.

Quick Start

Run php artisan olm:v5 to migrate all users, or specify a user with --user and adjust batch size with --batch.

Frequently Asked Questions about v5-migration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate v4 tag data to v5 PhotoTags in Laravel?▼

Run `php artisan olm:v5` to migrate v4 tag data to v5 PhotoTags in Laravel, processing category-based tags per user in batched, idempotent runs that prevent memory spikes and long-running transactions.

Can I migrate tags for a specific user and adjust the batch size?▼

Yes, specify a single user and adjust the batch size by passing the `--user` and `--batch` options to the `php artisan olm:v5` command, allowing controlled tag processing without memory spikes.

What happens if errors occur during the v4 to v5 data migration?▼

If errors occur during the v4 to v5 data migration, the process logs the errors and continues processing remaining batches. The migrated_at guard ensures failed runs can be retried without creating duplicate PhotoTags.

How does the migrated_at guard prevent duplicate PhotoTags during batch processing?▼

The migrated_at guard prevents duplicate PhotoTags during batch processing by marking users as processed upon successful migration, ensuring idempotent runs that skip already-migrated data on subsequent executions or retries.

What Laravel services are required to rebuild v5 tag structures and generate summaries?▼

Rebuilding v5 tag structures and generating summaries requires the UpdateTagsService and GeneratePhotoSummaryService, alongside MetricsService and TagKeyCache, to ensure normalized PhotoTags and downstream metrics are correctly calculated.

When do I need to use batch processing for Laravel data migration?▼

You need batch processing for Laravel data migration when moving large volumes of v4 category-based tags to v5 normalized PhotoTags, as configurable batch sizes prevent memory spikes and long-running database transactions during per-user processing.