From f37bedb86bf5aa67b579fa861b78eb1e525f1b81 Mon Sep 17 00:00:00 2001 From: Eugene Burmakin Date: Fri, 7 Nov 2025 13:41:34 +0100 Subject: [PATCH] Update migration --- app/controllers/trips_controller.rb | 2 -- ...ing_to_trips.rb => 20251105193510_add_sharing_to_trips.rb} | 4 +++- 2 files changed, 3 insertions(+), 3 deletions(-) rename db/migrate/{20251105153510_add_sharing_to_trips.rb => 20251105193510_add_sharing_to_trips.rb} (67%) diff --git a/app/controllers/trips_controller.rb b/app/controllers/trips_controller.rb index d60b7ef9..bc3f5786 100644 --- a/app/controllers/trips_controller.rb +++ b/app/controllers/trips_controller.rb @@ -39,10 +39,8 @@ class TripsController < ApplicationController end def update - # Handle sharing settings update handle_sharing_update if params[:sharing] - # Handle regular trip update if @trip.update(trip_params) redirect_to @trip, notice: 'Trip was successfully updated.', status: :see_other else diff --git a/db/migrate/20251105153510_add_sharing_to_trips.rb b/db/migrate/20251105193510_add_sharing_to_trips.rb similarity index 67% rename from db/migrate/20251105153510_add_sharing_to_trips.rb rename to db/migrate/20251105193510_add_sharing_to_trips.rb index 992e623a..280bfa05 100644 --- a/db/migrate/20251105153510_add_sharing_to_trips.rb +++ b/db/migrate/20251105193510_add_sharing_to_trips.rb @@ -1,9 +1,11 @@ # frozen_string_literal: true class AddSharingToTrips < ActiveRecord::Migration[8.0] + disable_ddl_transaction! + def change add_column :trips, :sharing_uuid, :uuid add_column :trips, :sharing_settings, :jsonb, default: {} - add_index :trips, :sharing_uuid, unique: true + add_index :trips, :sharing_uuid, unique: true, algorithm: :concurrently end end