Files
turftracker/database/migrations/V2__add_unique_index_weather_data.sql
Jake Kasper 7bb45b64eb flyway
2025-09-02 08:21:56 -05:00

7 lines
260 B
SQL

-- Flyway V2: Ensure weather_data upsert works by providing a unique index
-- This migration assumes V1 baseline corresponds to the current init.sql schema
CREATE UNIQUE INDEX IF NOT EXISTS ux_weather_data_property_date
ON weather_data(property_id, date);