mirror of
https://github.com/we-promise/sure
synced 2026-04-25 17:15:07 +02:00
* FIX prefer provider rate always - add debugging also * Move logic from securities over * FIXes * Review fixes * Update provided.rb --------- Signed-off-by: soky srm <sokysrm@gmail.com>
17 lines
531 B
Ruby
17 lines
531 B
Ruby
class CreateExchangeRatePairs < ActiveRecord::Migration[7.2]
|
|
def change
|
|
create_table :exchange_rate_pairs, id: :uuid, default: -> { "gen_random_uuid()" } do |t|
|
|
t.string :from_currency, null: false
|
|
t.string :to_currency, null: false
|
|
t.date :first_provider_rate_on
|
|
t.string :provider_name
|
|
t.timestamps
|
|
end
|
|
|
|
add_index :exchange_rate_pairs,
|
|
[ :from_currency, :to_currency ],
|
|
unique: true,
|
|
name: "index_exchange_rate_pairs_on_pair_unique"
|
|
end
|
|
end
|