Skip to content

chore: drop image_url column from world_heritage_sites#393

Merged
zigzagdev merged 1 commit intofeat/clean-up-codefrom
feat/create-drop-migration-file
Mar 29, 2026
Merged

chore: drop image_url column from world_heritage_sites#393
zigzagdev merged 1 commit intofeat/clean-up-codefrom
feat/create-drop-migration-file

Conversation

@zigzagdev
Copy link
Copy Markdown
Owner

@zigzagdev zigzagdev commented Mar 29, 2026

What

  • Add migration to drop image_url column from world_heritage_sites table

Why

image_url is now sourced exclusively from world_heritage_site_images.
This is the final step of the image refactoring (#294).

Verification

  • Ran php artisan app:world-heritage-build --fresh --jp --pretty --clear --algolia --algolia-truncate successfully
  • All 1248 records processed without errors

Copy link
Copy Markdown
Owner Author

@zigzagdev zigzagdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

Some tests referencing image_url are still failing.
These will be fixed in the next PR.

@zigzagdev zigzagdev merged commit 85a9865 into feat/clean-up-code Mar 29, 2026
3 of 27 checks passed
@zigzagdev zigzagdev deleted the feat/create-drop-migration-file branch March 29, 2026 06:18
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Drops the legacy image_url column from the world_heritage_sites table as the final step of the image refactor, relying on world_heritage_site_images as the single source of truth.

Changes:

  • Add a migration to drop world_heritage_sites.image_url
  • Add rollback behavior to restore the image_url column if needed

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +14 to +16
Schema::table('world_heritage_sites', function (Blueprint $table) {
$table->dropColumn('image_url');
});
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dropping world_heritage_sites.image_url will break any seed/test code that still inserts or upserts an image_url field into world_heritage_sites (e.g., src/database/seeders/WorldHeritageSeeder.php and multiple query service tests). Please remove/replace those writes before merging, otherwise running migrations + seeders/tests will fail with an unknown column error.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants