Index: branches/b_4_13_00_00/Database/UpgradeScripts/Upgrade_v.4.12.00.00_to_v.4.13.00.00.sql
===================================================================
diff -u -r256047 -r256115
--- branches/b_4_13_00_00/Database/UpgradeScripts/Upgrade_v.4.12.00.00_to_v.4.13.00.00.sql	(.../Upgrade_v.4.12.00.00_to_v.4.13.00.00.sql)	(revision 256047)
+++ branches/b_4_13_00_00/Database/UpgradeScripts/Upgrade_v.4.12.00.00_to_v.4.13.00.00.sql	(.../Upgrade_v.4.12.00.00_to_v.4.13.00.00.sql)	(revision 256115)
@@ -26,7 +26,7 @@
 SET v_last_rev = 'v.4.12.00.00';
 SET v_this_rev = 'v.4.13.00.00';
 SET v_rev_date = '2024-06-12';
-SET v_rev_note = 'This release implements change(s) SPP-198, SPP-197, SPP-199, TNSS-7679, TNSS-7680, TNSS-7753, TNSS-7681';
+SET v_rev_note = 'This release implements change(s) SPP-198, SPP-197, SPP-199, TNSS-7679, TNSS-7680, TNSS-7753, TNSS-7681, EOD-168';
 
 SET b_upgrade = 1;
 SET i_script_type = 1;
@@ -305,8 +305,72 @@
   UPDATE db_release SET notes = SUBSTRING(notes, 1, CHARINDEX('%', notes) - 3) || '20% done.' WHERE release_num = 'NOLOG';
 END IF;
 
+-- Begin EOD-168
+CALL tams_dba.sp_drop_object('table', 'STORE_DAY_CLOSED');
 
+CREATE TABLE STORE_DAY_CLOSED (
+       CLOSED_DAY           DATE NOT NULL,
+       NAME                 VARCHAR(30) NOT NULL
+);
 
+
+ALTER TABLE STORE_DAY_CLOSED
+       ADD PRIMARY KEY (CLOSED_DAY);
+
+
+CALL tams_dba.sp_drop_object('table', 'STORE_HOUR_EXCEPTION');
+
+CREATE TABLE STORE_HOUR_EXCEPTION (
+       EXCEPTION_DATE       DATE NOT NULL,
+       OPEN_TIME            TIME NOT NULL,
+       CLOSE_TIME           TIME NOT NULL
+);
+
+
+ALTER TABLE STORE_HOUR_EXCEPTION
+       ADD PRIMARY KEY (EXCEPTION_DATE);
+
+CALL tams_dba.sp_drop_object('table', 'STORE_HOURS');
+
+CREATE TABLE STORE_HOURS (
+       REF_DAY_OF_WEEK_ID   TINYINT NOT NULL
+                                          CHECK (REF_DAY_OF_WEEK_ID BETWEEN 0 AND 6),
+       STORE_IS_OPEN        VARCHAR(1) NOT NULL DEFAULT 'Y'
+                                          CHECK (STORE_IS_OPEN IN ('Y', 'N')),
+       OPEN_TIME            TIME,
+       CLOSE_TIME           TIME
+);
+
+
+ALTER TABLE STORE_HOURS
+       ADD PRIMARY KEY (REF_DAY_OF_WEEK_ID);
+
+COMMENT ON COLUMN STORE_HOURS.STORE_IS_OPEN IS 'Y=Yes; N=No';
+
+ALTER TABLE STORE_HOURS
+       ADD FOREIGN KEY FK_STORE_HOURS_REF_DAY_OF_WEEK (
+              REF_DAY_OF_WEEK_ID)
+                             REFERENCES REF_DAY_OF_WEEK  (ID)
+                             ON DELETE RESTRICT
+                             ON UPDATE RESTRICT;
+
+
+GRANT SELECT ON STORE_DAY_CLOSED TO tams_read, support_l12;
+GRANT SELECT ON STORE_HOUR_EXCEPTION TO tams_read, support_l12;
+GRANT SELECT ON STORE_HOURS TO tams_read, support_l12;
+
+GRANT DELETE, INSERT, UPDATE ON STORE_DAY_CLOSED TO tams_modify, support_l12;
+GRANT DELETE, INSERT, UPDATE ON STORE_HOUR_EXCEPTION TO tams_modify, support_l12;
+GRANT DELETE, INSERT, UPDATE ON STORE_HOURS TO tams_modify, support_l12;
+
+GRANT ALL ON STORE_DAY_CLOSED TO support_l34;
+GRANT ALL ON STORE_HOUR_EXCEPTION TO support_l34;
+GRANT ALL ON STORE_HOURS TO support_l34;
+
+
+-- End EOD-168
+
+
 MESSAGE '30% done...' TO CLIENT;
 IF i_script_type = 1 THEN
   UPDATE db_release SET notes = SUBSTRING(notes, 1, CHARINDEX('%', notes) - 3) || '30% done.' WHERE release_num = 'NOLOG';
