

--
--    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.
--    


-------------------------------------------------------------------------------
--	NC7_UPDATE_ORA.SQL			*	DO NOT EDIT	 *			Data Store Version: 7 		 
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
--$140-- tables drop begin
-------------------------------------------------------------------------------
DROP TABLE NC_SCHEDULE_QUEUE;

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

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

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

-------------------------------------------------------------------------------
--$201-- indices create begin
-------------------------------------------------------------------------------
CREATE INDEX I1N_SCHEDULE_QUEUE ON NC_SCHEDULE_QUEUE (
   SCHEDULE_ID);

-------------------------------------------------------------------------------
--$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);

-------------------------------------------------------------------------------
--$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 (7,'build no.');

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