Db0068: Killing salary payouts
This commit is contained in:
@@ -12,7 +12,7 @@ namespace Swarmops.Database
|
||||
/// <summary>
|
||||
/// This is the IN-CODE revision of the database. The version we expect to be running against.
|
||||
/// </summary>
|
||||
public static int DbVersionExpected => 67;
|
||||
public static int DbVersionExpected => 68;
|
||||
|
||||
|
||||
// This class is in horrible need of serious refactoring. For its simplicity in task, it's a horrible bowl of spaghetti.
|
||||
|
||||
@@ -184,17 +184,33 @@ namespace Swarmops.Database
|
||||
}
|
||||
|
||||
|
||||
public void SetSalaryAttested (int salaryId, bool attested)
|
||||
public void SetSalaryAttested(int salaryId, bool attested)
|
||||
{
|
||||
using (DbConnection connection = GetMySqlDbConnection())
|
||||
{
|
||||
connection.Open();
|
||||
|
||||
DbCommand command = GetDbCommand ("SetSalaryAttested", connection);
|
||||
DbCommand command = GetDbCommand("SetSalaryAttested", connection);
|
||||
command.CommandType = CommandType.StoredProcedure;
|
||||
|
||||
AddParameterWithName (command, "salaryId", salaryId);
|
||||
AddParameterWithName (command, "attested", attested);
|
||||
AddParameterWithName(command, "salaryId", salaryId);
|
||||
AddParameterWithName(command, "attested", attested);
|
||||
|
||||
command.ExecuteNonQuery();
|
||||
}
|
||||
}
|
||||
|
||||
public void SetSalaryOpen(int salaryId, bool attested)
|
||||
{
|
||||
using (DbConnection connection = GetMySqlDbConnection())
|
||||
{
|
||||
connection.Open();
|
||||
|
||||
DbCommand command = GetDbCommand("SetSalaryOpen", connection);
|
||||
command.CommandType = CommandType.StoredProcedure;
|
||||
|
||||
AddParameterWithName(command, "salaryId", salaryId);
|
||||
AddParameterWithName(command, "open", attested);
|
||||
|
||||
command.ExecuteNonQuery();
|
||||
}
|
||||
|
||||
@@ -63,5 +63,6 @@
|
||||
0063 - Added DeriveUnique to HotBitcoinAddresses for ability to create unique HBAs [RF]
|
||||
0064 - Quick fix for OutboundInvoices (how did this error happen?) [RF]
|
||||
0065 - Dumb fix for 0062 (or rather, the error was dumb) [RF]
|
||||
0066 - Added OrganizationSequenceId to CashAdvances, ExpenseClaims
|
||||
0067 - Bugfix for 0066
|
||||
0066 - Added OrganizationSequenceId to CashAdvances, ExpenseClaims [RF]
|
||||
0067 - Bugfix for 0066 [RF]
|
||||
0068 - Added SetSalaryOpen [RF]
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
DROP PROCEDURE IF EXISTS `SetSalaryOpen`
|
||||
|
||||
|
||||
#
|
||||
|
||||
|
||||
CREATE PROCEDURE `SetSalaryOpen`(
|
||||
IN salaryId INTEGER,
|
||||
IN open BOOLEAN
|
||||
)
|
||||
BEGIN
|
||||
|
||||
UPDATE Salaries SET Salaries.Open=open
|
||||
WHERE Salaries.SalaryId=salaryId;
|
||||
|
||||
END
|
||||
Reference in New Issue
Block a user