From 4c6baad5d4ac5e85f5a12c599731a924ef3352ec Mon Sep 17 00:00:00 2001 From: Eugene Burmakin Date: Tue, 21 Jan 2025 13:33:46 +0100 Subject: [PATCH] Rename unique index on points to `unique_points_lat_long_timestamp_user_id_index` --- .app_version | 2 +- CHANGELOG.md | 6 ++++++ db/migrate/20250120154555_add_unique_index_to_points.rb | 4 ++-- db/schema.rb | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.app_version b/.app_version index ca222b7c..610e2872 100644 --- a/.app_version +++ b/.app_version @@ -1 +1 @@ -0.23.0 +0.23.1 diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f4efd0e..c4c12037 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +# 0.23.1 - 2025-01-21 + +### Fixed + +- Renamed unique index on points to `unique_points_lat_long_timestamp_user_id_index` to fix naming conflict with `unique_points_index`. + # 0.23.0 - 2025-01-20 ## ⚠️ IMPORTANT ⚠️ diff --git a/db/migrate/20250120154555_add_unique_index_to_points.rb b/db/migrate/20250120154555_add_unique_index_to_points.rb index fc224ab0..2062c977 100644 --- a/db/migrate/20250120154555_add_unique_index_to_points.rb +++ b/db/migrate/20250120154555_add_unique_index_to_points.rb @@ -6,11 +6,11 @@ class AddUniqueIndexToPoints < ActiveRecord::Migration[8.0] def up add_index :points, %i[latitude longitude timestamp user_id], unique: true, - name: 'unique_points_index', + name: 'unique_points_lat_long_timestamp_user_id_index', algorithm: :concurrently end def down - remove_index :points, name: 'unique_points_index' + remove_index :points, name: 'unique_points_lat_long_timestamp_user_id_index' end end diff --git a/db/schema.rb b/db/schema.rb index 8fc8554c..c4529687 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -168,7 +168,7 @@ t.index ["external_track_id"], name: "index_points_on_external_track_id" t.index ["geodata"], name: "index_points_on_geodata", using: :gin t.index ["import_id"], name: "index_points_on_import_id" - t.index ["latitude", "longitude", "timestamp", "user_id"], name: "unique_points_index", unique: true + t.index ["latitude", "longitude", "timestamp", "user_id"], name: "unique_points_lat_long_timestamp_user_id_index", unique: true t.index ["latitude", "longitude"], name: "index_points_on_latitude_and_longitude" t.index ["reverse_geocoded_at"], name: "index_points_on_reverse_geocoded_at" t.index ["timestamp"], name: "index_points_on_timestamp"