Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions DatabaseInitialiser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,21 @@ private static List<string> 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)"
+ ")"
};
}
}