From 21c5599fa2954c5245519d9f7c4fc0b2fc47d3ad Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Fri, 6 Oct 2017 17:55:27 +0200 Subject: [PATCH] Added Document.HiresStatus --- Database/Schemata/revisions.txt | 3 ++- Database/Schemata/upgrade-0040.sql | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 Database/Schemata/upgrade-0040.sql diff --git a/Database/Schemata/revisions.txt b/Database/Schemata/revisions.txt index 02dce7db..a0e47d33 100644 --- a/Database/Schemata/revisions.txt +++ b/Database/Schemata/revisions.txt @@ -36,4 +36,5 @@ 0036 - Added support for VatCents on ExpenseClaims [RF] 0037 - Added Suppliers, ExternalContacts tables; no procs for them yet [RF] 0038 - VAT Report tables and functions [RF] -0039 - VatReport.Guid added [RF] \ No newline at end of file +0039 - VatReport.Guid added [RF] +0040 - Document.HiresStatus added [RF] \ No newline at end of file diff --git a/Database/Schemata/upgrade-0040.sql b/Database/Schemata/upgrade-0040.sql new file mode 100644 index 00000000..c68217d4 --- /dev/null +++ b/Database/Schemata/upgrade-0040.sql @@ -0,0 +1,21 @@ +ALTER TABLE `Documents` +ADD COLUMN `HiresStatus` INT NULL DEFAULT 0 AFTER `UploadedDateTime`, +ADD INDEX `Index_HiresStatus` (`HiresStatus` ASC) + + +# + + +DROP PROCEDURE IF EXISTS `SetDocumentHiresStatus` + + +# + + +CREATE PROCEDURE `SetDocumentHiresStatus`( + organizationId INT, + guid VARCHAR(128), + createdDateTime DATETIME, + yearMonthStart BIGINT, + monthCount INT +)