From d47939f80a939fdd1b5652b9198fcc4c8b66c3f8 Mon Sep 17 00:00:00 2001 From: justinwylie033 <121656622+justinwylie033@users.noreply.github.com> Date: Mon, 30 Oct 2023 00:33:36 +0000 Subject: [PATCH] Added tracking of completed operations should close issue. --- DatabaseInitialiser.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/DatabaseInitialiser.cs b/DatabaseInitialiser.cs index 26c0c2a..756c351 100644 --- a/DatabaseInitialiser.cs +++ b/DatabaseInitialiser.cs @@ -109,6 +109,21 @@ private static List GetTableCreationCommands() "Name TEXT NOT NULL," + "Type TEXT DEFAULT \"food\" REFERENCES resource_type(Name) ON DELETE CASCADE ON UPDATE CASCADE," + "Quantity INTEGER DEFAULT 0)" + "CREATE TABLE IF NOT EXISTS completed_operations (" + + "Id INTEGER PRIMARY KEY AUTOINCREMENT, " + + "OperationName TEXT NOT NULL, " + + "OperationStatus TEXT NOT NULL, " + + "OperationDate DATETIME NOT NULL, " + + "ResourceTypeId INTEGER, " + + "ResourceQuantity INTEGER, " + + "ResourceRequestStatus TEXT NOT NULL, " + + "ResourceRequestDate DATETIME NOT NULL, " + + "DeputyTeamLeaderId INTEGER, " + + "AuthorizationDate DATETIME, " + + "AuthorizationStatus TEXT NOT NULL, " + + "FOREIGN KEY(ResourceTypeId) REFERENCES resource_types(Id), " + + "FOREIGN KEY(DeputyTeamLeaderId) REFERENCES personnel(Id)" + + ")" }; } }