

--
--    Licensed Materials - Property of IBM
--    
--    BI and PM: JSM
--    
--    (c) Copyright IBM Corp. 2003, 2010.
--    
--    US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
--    


-------------------------------------------------------------------------------
--	NC4_UPDATE_DB2.SQL			*	DO NOT EDIT	 *			Data Store Version: 4 		 
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
--$100-- backup create begin
-------------------------------------------------------------------------------



-------------------------------------------------------------------------------
--$110-- backup inserts begin
-------------------------------------------------------------------------------



-------------------------------------------------------------------------------
--$120-- foreign keys drop begin
-------------------------------------------------------------------------------


-------------------------------------------------------------------------------
--$130-- views drop begin
-------------------------------------------------------------------------------



-------------------------------------------------------------------------------
--$140-- tables drop begin
-------------------------------------------------------------------------------


-------------------------------------------------------------------------------
--$200-- recreate tables begin
-------------------------------------------------------------------------------

CREATE TABLE NC_CONFIGURATION(
	PROPERTY_KEY 		VARCHAR(255) NOT NULL,
	PROPERTY_VALUE		VARCHAR(255)
);

CREATE TABLE NC_SCHEDULE_QUEUE(
   SCHEDULE_ID 			 INTEGER NOT NULL,
   RUN_DATE 			 NUMERIC(14)
);

-------------------------------------------------------------------------------
--$201-- indices create begin
-------------------------------------------------------------------------------



-------------------------------------------------------------------------------
--$202-- primary keys add begin
-------------------------------------------------------------------------------

ALTER TABLE NC_CONFIGURATION
   ADD CONSTRAINT PN_CONFIGURATION PRIMARY KEY (PROPERTY_KEY);
   
ALTER TABLE NC_SCHEDULE_QUEUE
   ADD CONSTRAINT PN_SCHEDULE_QUEUEI PRIMARY KEY (SCHEDULE_ID);

-------------------------------------------------------------------------------
--$203-- alter tables begin
-------------------------------------------------------------------------------



-------------------------------------------------------------------------------
--$210-- views create begin
-------------------------------------------------------------------------------


  
-------------------------------------------------------------------------------
--$220-- server data inserts begin
-------------------------------------------------------------------------------

INSERT INTO NC_CONFIGURATION(PROPERTY_KEY,PROPERTY_VALUE)
	VALUES ('scheduler.queue.factory.class','noticecast.scheduling.core.persistqueue.PersistQueueFactory');

INSERT INTO NC_CONFIGURATION(PROPERTY_KEY,PROPERTY_VALUE)
	VALUES ('scheduler.queue.loadonstart','true');
	
INSERT INTO NC_DB_VERSION (DB_VERSION_ID,BUILD) VALUES (4,'build no.');

-------------------------------------------------------------------------------
--$230-- restore inserts begin
-------------------------------------------------------------------------------



-------------------------------------------------------------------------------
--$240-- foreign keys add begin
-------------------------------------------------------------------------------



-------------------------------------------------------------------------------
--$250-- backup drop begin
-------------------------------------------------------------------------------


-------------------------------------------------------------------------------
--$260-- end sql by function
-------------------------------------------------------------------------------
--	END NC4_UPDATE_DB2.SQL			*	DO NOT EDIT	 * 		COMMIT 
-------------------------------------------------------------------------------
