

--
--    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_SYBASE.SQL			*	DO NOT EDIT	 *			Data Store Version: 7 		 
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
--$120-- foreign keys drop begin
-------------------------------------------------------------------------------


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

DROP TABLE NC_SCHEDULE_QUEUE
go

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

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


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

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

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

ALTER TABLE NC_CONFIGURATION
	ADD CONSTRAINT PN_CONFIGURATION PRIMARY KEY (PROPERTY_KEY)
go


ALTER TABLE NC_SCHEDULE_QUEUE
   ADD CONSTRAINT PN_SCHEDULE_QUEUEI PRIMARY KEY (SCHEDULE_ID)
go

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

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

INSERT INTO NC_CONFIGURATION(PROPERTY_KEY,PROPERTY_VALUE) 
	VALUES ('scheduler.queue.loadonstart','true')
go

INSERT INTO NC_DB_VERSION (DB_VERSION_ID,BUILD) VALUES (7,'build no.')
go


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