-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1873 from trade-tariff/OTT-299
End date ZWL currency may 24
- Loading branch information
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
db/data_migrations/20240524143604_remove_zimbabwe_exchange_rate_may24.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# frozen_string_literal: true | ||
|
||
Sequel.migration do | ||
up do | ||
if TradeTariffBackend.uk? | ||
zimbabwe_country_currency = ExchangeRateCountryCurrency.where(country_description: 'Zimbabwe', | ||
currency_code: 'ZWL', | ||
country_code:'ZW').first | ||
|
||
zimbabwe_country_currency.update(validity_end_date: Date.new(2024, 06, 01)) | ||
|
||
ExchangeRateCountryCurrency.create(country_description: 'Zimbabwe', | ||
currency_code: 'ZIG', | ||
country_code:'ZW', | ||
currency_description: 'Dollar', | ||
validity_start_date: Date.new(2024,06,01), | ||
validity_end_date: nil,) | ||
|
||
end | ||
end | ||
|
||
down do | ||
# We don't want to rollback to incorrect Zimbabwe rates. | ||
end | ||
end |