This commit is contained in:
Rick Falkvinge
2014-12-05 22:12:09 +01:00
5 changed files with 77 additions and 8 deletions
+1 -1
View File
@@ -57,7 +57,7 @@ if [ "$DROPFOLDER" == "internal" ]; then
echo "The packages (swarmops-frontend-internal, swarmops-backend-internal) are available from repositories now, and can be tested at http://dev.swarmops.com/ as usual. Last 3 commits listed above." >> deploymsg.txt
else
PACKAGELABEL="$DROPFOLDER $(cat ../lastbuild/swarmops/$DROPFOLDER/frontend/SprintName.txt | tr -d '\n\r')"
echo "NOTE: this is a $DROPFOLDER package bundle. It will deploy automatically to live systems via apt-get upgrade. Yay, we made another sprint!\r\n" > deploymsg.txt
echo "NOTE: this is a $DROPFOLDER package bundle. It will deploy automatically to live systems via apt-get upgrade. Yay, we made another sprint!" > deploymsg.txt
fi
# TODO: Add build messages to deploy message, at least for internal build
@@ -7,4 +7,4 @@ mkdir -p /var/lib/swarmops/upload
#start the daemon
/etc/init.d/swarmops-backend start
#register the daemon
update-rc.d swarmops-backend defaults 90 10
update-rc.d swarmops-backend defaults 90 10 > /dev/null
@@ -1,5 +1,5 @@
#! /bin/bash
update-rc.d -f swarmops-backend remove
update-rc.d -f swarmops-backend remove > /dev/null
/etc/init.d/swarmops-backend stop
+7 -5
View File
@@ -1,5 +1,7 @@
0001 - Initial baseline, Rick Falkvinge
0002 - Added functions for account plan maintenance and back/forward links to FinancialAccounts, Rick Falkvinge
0003 - Added 'Year' field for salary tax data, Rick Falkvinge
0004 - Added BankProfile tables and stored procs to insert/update, Rick Falkvinge
0005 - Changed PostalCodeLength for NO DK to 4; for GH to zero; added Country.Currency
0001 - Initial baseline. [Rick Falkvinge]
0002 - Added functions for account plan maintenance and back/forward links to FinancialAccounts. [Rick Falkvinge]
0003 - Added 'Year' field for salary tax data. [Rick Falkvinge]
0004 - Added BankProfile tables and stored procs to insert/update. [Rick Falkvinge]
0005 - Changed PostalCodeLength for NO DK to 4; for GH to zero; added Country.Currency. [Rick Falkvinge]
0006 - Added Memberships.LocalNumber and .FamilyNumber; added CurrencyExchangeRate tables/procs. [Rick Falkvinge]
+67
View File
@@ -0,0 +1,67 @@
ALTER TABLE `Memberships`
ADD COLUMN `MembershipNumberLocal` INT(11) NOT NULL DEFAULT 0 AFTER `MemberSince`,
ADD COLUMN `MembershipNumberFamily` INT(11) NOT NULL DEFAULT 0 AFTER `MembershipNumberLocal`,
ADD INDEX `Index_NumLocal` (`MembershipNumberLocal` ASC),
ADD INDEX `Index_NumFamily` (`MembershipNumberFamily` ASC)
#
ALTER TABLE `Organizations`
ADD COLUMN `GrandestparentOrganizationId` INT(11) NOT NULL DEFAULT 0 AFTER `ParentOrganizationId`,
ADD INDEX `Index_Parent` (`ParentOrganizationId` ASC),
ADD INDEX `Index_Family` (`GrandestparentOrganizationId` ASC)
#
CREATE TABLE `CurrencyExchangeRateSnapshots` (
`CurrencyExchangeRateSnapshotId` INT NOT NULL AUTO_INCREMENT,
`DateTime` DATETIME NOT NULL,
PRIMARY KEY (`CurrencyExchangeRateSnapshotId`),
INDEX `Ix_Date` (`DateTime` ASC))
#
CREATE TABLE `CurrencyExchangeRateSnapshotData` (
`CurrencyExchangeRateSnapshotId` INT NOT NULL AUTO_INCREMENT,
`CurrencyAId` INT(11) NOT NULL,
`CurrencyBId` INT(11) NOT NULL,
`APerB` DOUBLE NOT NULL,
PRIMARY KEY (`CurrencyExchangeRateSnapshotId`));
#
CREATE PROCEDURE `CreateExchangeRateSnapshot` (
IN dateTimeUtc DATETIME
)
BEGIN
INSERT INTO CurrencyExchangeRateSnapshots (DateTime)
VALUES (dateTimeUtc);
SELECT LAST_INSERT_ID() AS Identity;
END
#
CREATE PROCEDURE `InsertExchangeRateSnapshotData` (
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