Refactor park submission location handling

This commit is contained in:
gpt-engineer-app[bot]
2025-11-05 20:46:02 +00:00
parent f9c11cb064
commit dfd17e8244
4 changed files with 66 additions and 1 deletions

View File

@@ -0,0 +1,12 @@
-- Add temporary location storage to park_submissions
-- This stores location data until approval, when it will be created in locations table
ALTER TABLE park_submissions
ADD COLUMN temp_location_data JSONB;
COMMENT ON COLUMN park_submissions.temp_location_data IS
'Temporary storage for location data before approval. Contains: name, city, state_province, country, latitude, longitude, timezone, postal_code, display_name';
-- Add index for querying submissions with temp location data
CREATE INDEX idx_park_submissions_temp_location ON park_submissions (submission_id)
WHERE temp_location_data IS NOT NULL;