mirror of
https://github.com/rickbarrette/simple-aircraft-manager-rails.git
synced 2026-11-17 23:50:36 -05:00
9 lines
337 B
Ruby
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
|