Files
simple-aircraft-manager-rails/db/migrate/20261111050000_add_client_key_to_flight_logs.rb
T

9 lines
337 B
Ruby

class AddClientKeyToFlightLogs < ActiveRecord::Migration[8.1]
def change
# A random key from the form, so a flight logged offline and sent again
# (after a dropped connection) isn't saved twice.
add_column :flight_logs, :client_key, :string
add_index :flight_logs, [ :aircraft_id, :client_key ], unique: true
end
end