Adding currency exchange rate handling

This commit is contained in:
Rick Falkvinge
2014-12-27 20:21:35 +01:00
parent 4575305ff0
commit 41949bbc1c
11 changed files with 233 additions and 1 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ namespace Swarmops.Database
/// </summary>
public static int DbVersionExpected
{
get { return 8; }
get { return 9; }
}
+1
View File
@@ -6,3 +6,4 @@
0006 - Added Memberships.LocalNumber and .FamilyNumber; added CurrencyExchangeRate tables/procs. [Rick Falkvinge]
0007 - NL update; added Lat/Long to PostalCodes and to People, indexed [RF]
0008 - GeographyUpdate updates ahead of deploying: added country, Guid [RF]
0009 - Fixed SalaryTaxLevels and CreateExchangeRateDataPoint [RF]
+26
View File
@@ -0,0 +1,26 @@
ALTER TABLE `SalaryTaxLevels`
DROP PRIMARY KEY,
ADD PRIMARY KEY (`TaxLevelId`, `BracketLow`, `CountryId`, `Year`)
#
DROP PROCEDURE `InsertExchangeRateSnapshotData`
#
CREATE `CreateExchangeRateDatapoint`(
IN currencyExchangeRateSnapshotId INTEGER,
IN currencyAId INTEGER,
IN currencyBId INTEGER,
IN aPerB DOUBLE
)
BEGIN
INSERT INTO CurrencyExchangeRateSnapshotData (CurrencyExchangeRateSnapshotId,CurrencyAId,CurrencyBId,APerB)
VALUES (currencyExchangeRateSnapshotId,currencyAId,currencyBId,aPerB);
END