feat: restore transboundary flag as is_transboundary column / 越境遺産フラグの復活 - #582
Open
zigzagdev wants to merge 6 commits into
Open
feat: restore transboundary flag as is_transboundary column / 越境遺産フラグの復活#582zigzagdev wants to merge 6 commits into
zigzagdev wants to merge 6 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #582 +/- ##
============================================
+ Coverage 64.66% 67.02% +2.36%
- Complexity 1694 1707 +13
============================================
Files 147 149 +2
Lines 8858 8929 +71
============================================
+ Hits 5728 5985 +257
+ Misses 3130 2944 -186
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation / 目的
UNESCO's own dataset already flags whether a site is transboundary (spans multiple countries via a serial nomination), but this project fetched that value and then silently discarded it during import. This restores it as a real column.
UNESCOのデータセット自体が「越境遺産かどうか」を示す真偽値を既に持っていますが、これまでは取得しておきながらインポート処理の途中で捨てていました。実カラムとして復活させます。
What I have done / 実施内容
is_transboundary(boolean, default false) column toworld_heritage_sitesvia migrationSplitWorldHeritageJson::normalizeSiteRowImportReady()/mergeSiteRowPreferExisting()now carrytransboundaryfrom the raw UNESCO dump through to the normalized site record (same pattern as the existingis_endangeredhandling)ImportWorldHeritageSiteFromSplitFilenow persistsis_transboundaryto the DBis_transboundarytoWorldHeritage::$fillablestorage/app/private/unesco/normalized/world_heritage_sites.jsonsnapshot withis_transboundarypopulated for all 1248 sites (same precedent as the earliermain_image_urlbackfill)Verification / 検証
Ran the full pipeline (split → import) end to end against the real UNESCO dump and confirmed in the DB:
is_transboundary = trueis_transboundary = falseFull
WorldHeritage-related test suite (63 tests) re-run with no regressions.Scope / スコープ
This PR stops at the DB layer as agreed. Exposing
is_transboundaryvia the API/DTO or as an Algolia facet is intentionally out of scope here and will be a separate follow-up once a concrete feature (e.g. a transnational-sites filter) needs it.Closes #581