Add external_ids, place_status, and user_verified fields#54
Merged
Conversation
bf22342 to
e466786
Compare
|
Claude finished @koinsaari's task in 1m 19s —— View job Review complete
The previously flagged bug is fixed: No other must-fix issues found. The migration order is correct (type created before column, column dropped before type in the down migration), PR looks good to merge. |
- Add migration 000006: external_ids JSONB + GIN index and status place_status enum column on places; user_verified boolean on accessibility_profiles - Add PlaceStatus type and ExternalIDs custom JSONB map type to pkg/models/place.go; add ExternalIDs and Status fields to Place - Add UserVerified bool to AccessibilityProfile in pkg/models/accessibility.go - Update OpenAPI spec with PlaceStatus enum; external_ids and status (readOnly) on Place; user_verified (readOnly) on AccessibilityProfile - Regenerate internal/api/v1/server.gen.go
e466786 to
9f53b42
Compare
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.
Summary
Schema prerequisites for the ingestion service — must be in place before
inwheel-ingestionstarts writing to the API.Changes
Migration 000006
places.external_ids JSONB— stores identifiers from external sources keyed by source name (e.g.{"osm": "node/123456"}). Used by the ingestion service to find existing places during OSM diff processing without matching on coordinates or name. GIN index for fast JSONB lookups.places.status place_status— enumactive | closed | osm_removed. Protects user-contributed accessibility data when OSM removes a place: instead of hard-deleting, the ingestion service setsosm_removedand keeps the record.accessibility_profiles.user_verified BOOLEAN DEFAULT FALSE— set totruewhen a human user explicitly submits accessibility data. The ingestion service checks this before overwriting a profile with automated data.Models
PlaceStatustype withactive,closed,osm_removedconstantsExternalIDscustom JSONB map type (same Scan/Value pattern asPlaceTags)ExternalIDsandStatusfields onPlaceUserVerifiedfield onAccessibilityProfileOpenAPI
PlaceStatusenum schemaexternal_ids(read/write) andstatus(readOnly) on Placeuser_verified(readOnly) on AccessibilityProfileserver.gen.goAll new columns have safe defaults — no existing data or tests break.
Closes #53